TORONTO — Kyle Lowry scored nine of his 24 points in the fourth quarter, DeMar DeRozan added 21 and the Toronto Raptors beat San Antonio 86-83 on Friday night to snap a four-game losing streak against the Spurs.

Jonas Valanciunas had 15 points and 11 rebounds as the Raptors improved to 17-3 at home, the second-best home record in the NBA behind San Antonio’s mark of 19-2.

LaMarcus Aldridge had 17 points and 14 rebounds, Pau Gasol scored 15 points and Patty Mills had 13 as San Antonio lost for the fourth time in six road games. The Spurs are 11-15 away from home.

It had been more than two years since Toronto last beat San Antonio. The Raptors won 97-94 at home on Dec. 9, 2015.

San Antonio guard Manu Ginobili missed his second straight game because of a sore right thigh. Ginobili returned to Texas after the Spurs won at Brooklyn on Wednesday.

NETS 101, HEAT 95: DeMarre Carroll scored 26 points and Spencer Dinwiddie had 15 as Brooklyn snapped a five-game home losing streak.

Caris LeVert and Joe Harris each added 12 points for the Nets. D’Angelo Russell played 14 minutes and went 0 for 5 from the field for Brooklyn in his first action after missing 32 games following left knee surgery.

Hassan Whiteside had 21 points and 13 rebounds, and Goran Dragic scored 17 points for the Heat.

WIZARDS 122, PISTONS 112: Bradley Beal and Kelly Oubre Jr. had 26 points each, and Washington scored 45 points in the third quarter before holding on for a win at Detroit.

The Pistons cut a 20-point second-half deficit to four in the fourth quarter, but John Wall made a big 3-pointer to put the Wizards up 107-100. Oubre added a four-point play a few possessions later to push Washington’s lead to nine.

Andre Drummond had 14 points, 21 rebounds and eight assists for the Pistons.

GRIZZLIES 106, KINGS 88: Dillon Brooks scored a career-best 22 points, Ben McLemore had a season-high 21 and host Memphis beat skidding Sacramento for its third consecutive win.

The game marked Zach Randolph’s first return to Memphis since spending eight years as a key figure in the Grizzlies’ success. The power forward received a standing ovation when he was introduced with the starting lineups. Randolph finished with four points and six rebounds for the Kings, who have lost seven straight.