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.
The Spurs trailed 70-69 after a 3-pointer by Bryn Forbes at 6:52 of the fourth, but DeRozan and Lowry connected on back-to-back possessions, giving Toronto a 74-69 lead with 5:11 remaining.
After a jump shot by Mills, Toronto reeled off a 6-0 run including baskets by Lowry, Valanciunas and DeRozan to lead 80-71 with 2:40 left.
Another 3-pointer by Forbes made it 86-83 with six seconds left. DeRozan was fouled but missed both free throws, giving San Antonio a chance to tie, but the Spurs couldn't get a shot off in time.
After making seven of 23 shots in the first quarter, the Raptors hit 11 of 20 attempts in the second, including a buzzer-beating jumper from DeRozan that gave Toronto a 44-37 lead at halftime.
Toronto led 55-41 on DeRozan's three-point play at 7:33 of the third but Aldridge did all the scoring in an 8-0 Spurs run that cut the gap to 63-60 heading to the fourth.
Spurs: Aldridge has 19 double-doubles this season, one more than he had all of last season. ... Kyle Anderson had 11 rebounds. ... Aldridge missed nine of his 11 shot attempts in the first half.
Raptors: G Fred VanVleet (right knee) missed his second straight game. ... DeRozan had a team-leading six assists. ... Toronto FC forward and former MLS MVP Sebastian Giovinco attended the game.
Spurs: Host Indiana on Sunday. San Antonio has won three straight home meetings with the Pacers, but lost at Indiana earlier this season.
Raptors: Visit Minnesota on Saturday. It's Toronto's final road game of the season against a Western Conference opponent.
More NBA basketball: https://apnews.com/tag/NBAbasketball
Check out the team sites for the San Antonio Spurs and the Toronto Raptorsfor more game coverage.