Cleveland coach Byron Scott had some venting to do after his team's latest second-half collapse. Star guard Kyrie Irving's shoulder injury didn't improve his mood.

Amir Johnson scored 17 points and matched his career high with 16 rebounds, Alan Anderson scored 10 of his 18 points in the fourth quarter and the Toronto Raptors overcame a 17-point deficit to beat the slumping Cavaliers 100-96 on Sunday night.

Irving was knocked out with a left shoulder contusion late in the third quarter as Cleveland lost for the fourth time in five games. X-rays at the Air Canada Centre were negative and he will be re-evaluated in Cleveland on Monday.

Irving was hurt when he collided with Toronto rookie Jonas Valanciunas on a baseline drive with 2:04 left in the third, and he shot the resulting free throws one-handed. Irving made the first but missed the second before walking off and heading to the locker room. He finished with 12 points.

"I was afraid to touch it," Irving said of his shoulder. "I was just unsure of what was going on."

A frustrated Irving said the shoulder "still doesn't feel right" when he spoke with reporters afterward, and he appeared to be favoring it as he got dressed.

"I wouldn't call it a cheap shot or anything like that, but I've done that play a lot of times and I've never come out feeling like this," he said.

Irving missed 11 games between Nov. 21 and Dec. 8 with a broken finger. He also sat out three games between Feb. 26 and March 1 with a sore right knee.

Cleveland's locker room was kept closed for more than 20 minutes after the game as Scott challenged his team over their recent string of poor third quarters. The Cavaliers have been outscored in the third in four straight games, including double-digit margins in their past two.

"Another one of those third-quarter blunders," Scott said. "I asked the guys to tell me what it was, what's the reason that we come out the way we do in the second half, and then I gave my opinion.

"It's something that we've definitely got to fix. It's not as good feeling in there to know you played pretty well in the first half and then you come out the second half and play like that."

Cavs forward Tristan Thompson said the solution was "simple."

"We've got to come out and play like men in the third quarter," he said. "The last five games teams have been kicking our butt, kicking our tail, outscoring us by double digits. It starts on the defensive end. We've got to be men and get stops and play together."

Toronto has injury problems of its own, but won for just the second time in eight games. Forward Rudy Gay was held out with a stiff back, while center Andrea Bargnani was scratched because of a strained right elbow. Rookie Terrence Ross made his first start in place of Gay. Johnson started for Bargnani.

"I applaud our guys the way they played in the second half," Raptors coach Dwane Casey said.

Kyle Lowry had 15 points and nine rebounds, Ross scored 14 points and DeMar DeRozan had 13 points for Toronto, which had lost its previous two meetings with the Cavaliers.

Cleveland rookie Dion Waiters scored 13 of his 21 points in the fourth, Thompson had 11 points and 10 rebounds and C.J. Miles scored 15.

"Toronto deserved this win," Thompson said. "They outplayed us, they kicked our (butt) in the third quarter."

A 3 by Anderson gave Toronto a 90-82 lead with 5:40 to go, but Cleveland scored the next six points, five of them from Waiters, to make it 90-88 with 4:15 remaining.

Waiters tied it at 94-all on a driving layup with 1:42 left, then made one of two from the foul line to put Cleveland up 95-94 at 1:20, giving the Cavs their first lead of the fourth quarter.

Lowry restored Toronto's lead by making two free throws with 52 seconds to go. After a missed shot by Shaun Livingston, Lowry added a turnaround jumper, making it 98-95 with 14 seconds left.

Toronto sent Waiters to the line with 4.7 seconds left. He made the first but missed the second, and DeRozan was fouled as he grabbed the rebound. He sealed the win by making both free throws.

Waiters scored seven points in the first and Zeller had six as Cleveland went ahead with a 9-0 run and led 27-20 after one.

Miles made four 3-pointers and scored 13 points in the second, and Irving added nine as the Cavaliers opened a 50-33 lead with 3:46 left. Toronto closed the half on an 11-4 run, cutting it to 55-46 at the break.

Cleveland called time at 5:59 of the third after a layup by Johnson cut it to 63-60, and Valanciunas tied it on a pair of free throws at 2:48 left. Cleveland regained the lead, but Valanciunas tied it again, converting a three-point play at 1:24. Five more free throws, including one for a technical foul on Marreese Speights, gave the Raptors an 80-74 lead heading into the fourth.

NOTES: Bargnani was injured in the first quarter of Friday's overtime loss at the Los Angeles Lakers. He will have tests Monday. ... Toronto improved to 2-12 when shooting less than 40 percent from the floor. ... Heisman Trophy winner Johnny Manziel attended the game.