TORONTO -- Kyrie Irving drained a three-pointer with 0.9 seconds left en route to a 32-point performance and the Cleveland Cavaliers edged the Toronto Raptors 99-98 on Saturday.

Irving calmly jogged up the court and sank a 30-foot shot over Alan Anderson, who didn't appear to be expecting to defend a three-point attempt.

Amir Johnson topped Toronto (16-28) with 18 points and 12 rebounds, while Anderson added 17 points, Ed Davis finished with 16, DeMar DeRozan scored 15 and Jose Calderon added 10.

Marreese Speights finished with 17 for the Cavs (13-32), who've won three in a row.

Tristan Thompson of Brampton, Ont., the highest Canadian ever taken in the NBA draft -- No. 4 in 2011 -- had 14 points and eight rebounds in 33 minutes for Cleveland.

The Raptors -- dressed in their camo uniforms in honour of the Canadian Forces -- led almost the entire game and took a nine-point advantage into the fourth quarter.

The Cavs raced out on a 12-0 run early in the final quarter, eliciting groans from the Air Canada Centre crowd of 18,820 fans that have seen too many late-game collapses from Toronto of late.

Irving's jumper with 3:38 to go put the Cavs up by five -- Cleveland's biggest lead of the game. Raptors rookie Terrence Ross was big down the stretch, draining a pair of threes, and a layup with 2:11 that tied the game at 94-94.

A Ross rebound led to a dunk by Johnson that gave the Raptors the lead with 1:16 to play. Irving and Calderon traded layups, Calderon's putting Toronto up by two with 13 seconds left.

Irving's three instantly quieted what had been a delirious crowd.

A loss to a team below them in the standings was a big blow to a Raptors team that began the night four games back of Boston for the eighth and final playoff spot in the Eastern Conference, and four-and-a-half games ahead of the Cavs.

The short-handed Raptors should get some help within the next couple of weeks. Raptors coach Dwane Casey said Andrea Bargnani and Jonas Valanciunas could return to the lineup within about a week and a half. Bargnani (torn elbow ligament) has missed 22 games, while Valanciunas (broken finger) has missed 16.

"The thing is incorporating them back in to how we want to play, and how we're playing now," Casey said.

DeRozan scored 12 points in a first quarter that saw the Raptors shoot 58 per cent. Toronto was ahead by as much as 10 before taking a 25-19 lead into the second.

The Raptors went up by 11 on an Anderson jumper early in the second, but the Cavs chipped at the lead to pull within two with about 30 seconds left in the half. A Davis dunk sent the Raptors into the dressing room with a 50-46 lead.

The visitors made it a two-point game several times in the third but the Raptors outscored Cleveland 25-20 in the quarter to lead 75-66 with one quarter left.