TORONTO -- DeMar DeRozan scored 20 points and the Toronto Raptors rallied in the fourth quarter Sunday to defeat the Orlando Magic 97-86 at Air Canada Centre.

Andrea Bargnani scored 17 points for Toronto (3-7), while Jose Calderon had nine points and 18 assists. Bench players Amir Johnson and Linas Kleiza had 17 and 12 points respectively.

Glen Davis and E'Twaun Moore had 16 each for Orlando (3-6). Arron Afflao added 15 and Nikola Vucevic had 12. Davis also had 12 rebounds.

Orlando led by two points entering the fourth quarter after outscoring Toronto 28-18 in the third. Toronto came back on consecutive three-pointers by Kleiza and Johnson to take a 79-74 lead with 7:25 left to play.

Bargnani hit a jumper with 4:40 left in the fourth to start a nine-point Raptors surge that gave them an 89-78 lead. After an Orlando turnover Bargnani made a jump shot and DeRozan made a dunk on a pass from Calderon.

After each team missed a shot, the Raptors came back with a three-pointer by Kleiza to lead 92-78 with 2:50 to play.

The Magic overcame the Raptors' eight-point half-time lead to creep to within one point on a three-point shot made by DeQuan Jones with 8:06 to play in the third quarter.

But the Raptors scored six of the next eight points, four by Dominic McGuire, to go up by five.

Andrew Nicholson of Mississauga. Ont., cut the lead to one again with 3:05 to play in the third when he scored on a driving jumper and made the resulting free throw. He finished with eight points.

Jameer Nelson tied the game 65-65 with a pull-up jumper from the top of the key with 1:49 to play in the quarter. After Toronto went ahead by one on a free throw by Jonas Valanciunas, Nelson made a layup and came back with a jumper to give the Magic a three-point lead. DeRozan hit a free throw with 11 seconds left make the score 69-67 for Orlando after three quarters.

The Magic, trailing by 10 points after the first quarter, cut the lead to five points on a second-effort layup by Glen Davis with 4:49 to play in the second quarter. But the Raptors came back to lead by 12 before the Magic began chipping away again and cut the lead to 49-41 at the half after Moore made a running jump shot with 49 seconds to play.

DeRozan scored 15 points in the first half, Bargnani had 11 and Calderon nine. Afflalo had nine and Davis and Vucevic eight each for Orlando.

The Raptors led 32-22 after the first quarter with Moore's three-pointer with 30 seconds left cutting into what had been a 13-point lead. DeRozan led first-quarter scorers with 11points and Afflalo had nine for the Magic.

Notes: The Toronto Raptors announced Sunday that Toronto-born centre Jamaal Magloire, a 12-year NBA veteran, has been hired as a basketball development consultant and community ambassador. Magloire will assist with player development programs, help the coaching staff with individual skill development of players, and appear at organizational events and functions. Magloire spent last season with the Raptors. ... The Raptors were again without Kyle Lowry (right foot), Landry Fields (right elbow) and Alan Anderson (left foot). ...The Magic were without Al Harrington (right knee), Hedo Turkoglu (left hand) and J.J. Reddick (illness). ...Toronto plays Tuesday at Philadelphia and Orlando plays Monday at Atlanta.