TORONTO -- DeMar DeRozan scored 41 points and Jonas Valanciunas added 18 points and 23 rebounds as the Toronto Raptors came back for a 114-106 win over the Boston Celtics on Tuesday night at Air Canada Centre.

The win ended a two-game slide and prevented Boston (23-15) from pulling even with the first-place Raptors (25-13) in the Atlantic Division standings.

Toronto trailed by 16 points midway through the third quarter but DeRozan helped bring the Raptors back into the game in the fourth. He scored six straight points before Kyle Lowry hit a three-pointer with 2:41 left to give Toronto a 104-102 lead.

An Isaiah Thomas layup pulled Boston even but DeRozan hit a pair of clutch jumpers down the stretch as Toronto scored eight straight points to pull away.

Thomas led the Celtics with 27 points while Al Horford had 14 points and nine rebounds.

DeRozan also had 13 rebounds while Kyle Lowry added 24 points for Toronto, which ended Boston's four-game winning streak.

Valanciunas was an early force for the Raptors, who wore their Huskies jerseys for the third time this season. He had eight rebounds and six points in the first eight minutes before coming out after picking up a pair of early fouls.

Lucas Nogueira gave Toronto a spark off the bench, converting an alley-oop pass from Lowry to give the Raptors a 21-14 lead. Nogueira also contributed at the defensive end moments later with a punishing block on Boston's Jonas Jerebko.

Toronto led 23-18 after the opening quarter.

Thomas was called for a technical foul with 4:41 left in the second quarter and the game tied at 42. It seemed to spur the Celtics, who went on an 11-0 run until DeMarre Carroll hit a three-pointer with 13.9 seconds left in the half.

The Raptors had 12 turnovers over the first two quarters, leading to 14 Boston points. The Celtics, meanwhile, turned the ball over seven times (for seven points) and led 55-46 at halftime.

Kelly Olynyk from Kamloops, B.C., hit an open three-pointer early in the third to give Boston a 65-52 lead. The Celtics would extend their lead to 16 moments later but an 8-0 Toronto run -- highlighted by a Carroll three-pointer -- helped the Raptors cut into the deficit.

Boston led 84-80 entering the fourth quarter.

Notes: The Celtics have a 49-34 edge in the all-time series against the Raptors. ... Toronto beat the Celtics 101-94 in their only previous meeting this season on Dec. 9 at Boston. ... Former Raptor forward Amir Johnson received some cheers in the pre-game introductions. ... It's the first time the Raptors have played consecutive home games since Dec. 5-8. ... The Raptors wore blue Huskies road uniforms and played on an alternate court using the Huskies' logo and colour scheme. ... The Toronto Huskies and Celtics were both charter members of the Basketball Association of America in 1946. The league was renamed the National Basketball Association in 1949 after merging with the National Basketball League. ... The Raptors return to action Friday night against the visiting Brooklyn Nets.