Trailing 96-93 with 8.9 seconds to play, the Magic had the ball and an opportunity to tie the game. But coming out of a timeout they failed to inbound the ball, turning it over on a 5-second violation. DeRozan was fouled and hit a pair of free throws to provide the final margin.

The win was the Raptors' third in a row and seventh straight over the Magic. Toronto swept the season series 3-0.

Nik Vucevic led the Magic with 22 points and 10 rebounds. Jameer Nelson and Victor Oladipo each added 16 points.

After struggling offensively for most of the second half, the Magic cut a 21-point deficit all the way down to 76-73 on a layup by Tobias Harris with 9:53 to play in the game.

A driving layup by Oladipo a few possessions later tied it at 78.

Orlando had a chance to take the lead, but came up empty on a pair of 3-pointers.

The Raptors settled down and carved out an 87-80 cushion on a pair of free throws by DeRozan with 5:16 remaining.

Harris trimmed it to 93-88 with 1:21 left, but DeRozan responded on the ensuing possession with a 3 to push it back to eight.

It was 96-90 when a Toronto turnover gave the Magic the ball and some life with under a minute to play. Arron Afflalo took advantage with a 3-pointer to cut it to 96-93.

Lowry's layup rolled off the side of the rim on the Raptors' next touch, giving the Magic their chance to tie with 8.9 seconds remaining.

But that's when Maurice Harkless failed to inbound the ball within 5 seconds.

The Raptors led 57-38 at the half, but struggled to shake free of the Magic early on.

Orlando led 20-18 in the first quarter before Toronto closed the period with a 9-2 spurt.

It continued at the start of the second quarter with a 17-4 run that gave the Raptors an 18-point cushion. Valanciunas led the surge with 16 first-half points.

Vucevic had 18 points in the half for the Magic, but no other Orlando player had more than six. Leading-scorer Afflalo was held scoreless.

The Magic also went more than 9 minutes at one point in the half without a field goal, going 0 for 10 from the field with five turnovers.

NOTES: Vucevic recorded his 36th double-double of the season. ... Raptors F Patrick Paterson missed his 13th straight game with a right ulnar collateral sprain. ... G Greivis Vasquez returned to the game in the second half after receiving five stiches to his left cheek following a collision in the first half.