Lou Williams made a 3-pointer with 9.9 seconds left to lift Toronto to a 101-99 win over the Orlando Magic, the Raptors' 11th straight win over the Magic.
DeMar DeRozan led Toronto with 29 points. Tyler Hansbrough added 16 points and Williams finished with 13.
Orlando was led by Victor Oladipo with 19 points, but Oladipo missed a 15-footer in the final second that would have tied the game. Evan Fournier had 18 points and Tobias Harris and Nik Vucevic 16 each for Orlando, which lost for the first time in four games.
Orlando used a 9-0 run for a 94-90 lead on Harris' follow shot with 2:30 left. Toronto responded with six straight points, capped by a runner in the lane from DeRozan with 50 seconds left.
The team's traded baskets before Oladipo gave Orlando a 99-98 lead on a 3-pointer with 17 seconds remaining.
After a timeout, DeRozan drove the lane and squeezed a pass between defenders to Williams, standing alone in the corner. The Raptors' Sixth Man of the Year candidate let fly with the winning basket. It was the last of his eight points in the fourth quarter.
Orlando had one more chance, but couldn't capitalize. Oladipo drove to the free throw line and elevated for a game-tying shot, but was short. The Raptors secured the rebound as time ran out.
The back-and-forth play in the final minutes mirrored much of the game.
Toronto led by as many as 12 in the first half, but the Magic rode Fournier's hot shooting from the perimeter to a 51-49 halftime lead. The second-year shooting guard, who had played only once since missing 17 games with a hip injury, knocked down three straight 3-pointers and two more shots from just inside the line to help the Magic get a brief advantage.
The teams traded baskets throughout the third period that fittingly ended in a 76-76 tie. Toronto did most of its damage from the perimeter, while all of Orlando's offence came inside the lane.
Two dunks by Hansbrough were Toronto's only points inside the paint. Oladipo's 10-foot runner in the lane was the longest shot Orlando made in the quarter.
TORONTO: PG Kyle Lowry, who missed the last seven games with back spasms, was in the starting lineup. He scored 10 points and had seven assists in 33 minutes. . F Amir Johnson missed his third straight game with a sprained ankle. . C Jonas Valanciunas had 13 rebounds at halftime, six at the offensive end. . The Raptors are one victory away from tying the franchise-record 48 wins set a year ago.
ORLANDO; The last Orlando win over the Raptors came on March 27, 2012. . Rookie PG Elfrid Payton is averaging 12.9 points, 9.3 assists and 6.5 rebounds in the seven games since scoring back-to-back triple-doubles. . PG Luke Ridnour returned to the team after missing three games for the birth of his son, Ryker Ridnour.
Toronto: plays at Miami on Saturday night.
Orlando: has a rare back-to-back home situation, hosting New York on Saturday night.