CHARLOTTE, N.C. — Marvin Williams scored a season-high 30 points on seven 3-pointers, and the Charlotte Hornets snapped a five-game home losing streak with a 112-111 win over the Washington Wizards on Friday night.

Williams was 7-of-10 from beyond the arc and had seven rebounds as the Hornets got a much needed win to remain in the hunt for the eighth spot in the Eastern Conference playoffs.

Jeremy Lamb had 19 points and 10 rebounds and made a go-ahead 3-pointer in transition with 50.9 seconds left, the 14th and final lead change of a nip-and-tuck game. Kemba Walker added 18 points for Charlotte but again struggled from the field shooting 6-of-19.

Bobby Portis had 23 points and nine rebounds for the Wizards, who have lost eight of their last 10.

Magic 111, Mavericks 106: Terrence Ross scored 22 points, Nikola Vucevic had 20 points and 13 rebounds and host Orlando topped Dallas. Aaron Gordon added 18 points for Orlando, which won for the 11th time in 16 games. Luka Doncic had 24 points and eight rebounds for Dallas, which has lost four straight and nine of 10. Jalen Brunson added 18 points and nine assists. Dirk Nowitzki scored nine points in the fourth quarter and finished with 15, matching his season high in his 21st and final NBA season. The Magic took a 19-point lead into the fourth quarter before Nowitzki and Doncic led a late charge that got the Mavericks back in the game in the final two minutes.

Raptors 127, Pelicans 104: Kawhi Leonard scored 31 points and visiting Toronto snapped a two-game skid. Pascal Siakam had 19 and Jeremy Lin added 14 for the Raptors, who began to pull away late in the third quarter and cruised to the finish against a Pelicans squad missing Anthony Davis, Jrue Holiday and E'Twaun Moore. Frank Jackson scored 20 points for the Pelicans, who've lost two straight. Julius Randle had 18 points and nine rebounds, and Cheick Diallo had 16 points and 12 boards for New Orleans. Toronto shot 54.1 percent (53-for-98), scoring 66 points in the paint and 53 on fast breaks.