Darius Garland made a pair of free throws with 4.8 seconds remaining, and the Cleveland Cavaliers rallied to beat the Raptors 102-101 on Friday night, ending Toronto’s winning streak at five games.

Garland scored 17 of his 21 points in the second half, Jarrett Allen had 16 points and 15 rebounds, and Evan Mobley scored 18 for the Cavs, who had lost their previous six games at Toronto.

“They are a really good, physical, active, defensive team that tries to get you on your heels,” Cavs coach J.B. Bickerstaff said of the Raptors. “In the second half, Darius put them on their heels.”

Also read: NBA: Riding on Randle’s brilliance, Knicks beat Milwaukee Bucks

Allen credited Garland, a third-year guard, for keeping the Cavs composed in the final minutes.

“Towards the end we could see we were getting flustered,” Allen said. “They were hitting some tough shots, our defense wasn’t where it needed to be. He got us all grouped together and told us that we needed to be on our game, and we got it done.”

Cleveland won its third straight and improved to 4-3 on the road.

“We’re getting more and more confident every game,” Mobley said. “The chemistry is building every game.”

Bickerstaff was impressed with the maturity his team showed in overcoming a tough opponent on the road.

“There’s something special growing in that locker room,” Bickerstaff said.

  Also read: NBA: Golden State Warriors hoping to continue winning form against New Orleans Pelicans

OG Anunoby scored 23 points but missed a jump shot in the final seconds that would have won it for the Raptors. Rookie Scottie Barnes, who returned after missing two games because of a sprained right thumb, couldn’t convert a tip-in on Anunoby’s late miss.

“We got the ball to OG, got a decent shot,” Barnes said. “I just missed the tip.”

Cedi Osman scored 17 points for the Cavaliers and Ricky Rubio had 11.

Fred VanVleet scored 18 points, Gary Trent Jr. had 17 and Barnes scored 14 for the Raptors, who led by 15 points early in the third quarter.

“That one felt strange to lose,” Raptors coach Nick Nurse said. “I think we played pretty hard and I think we played pretty well.”

Toronto led 80-74 to begin the fourth. With 4:42 remaining, Allen banked home a 3-pointer to tie it at 94-all.

“The basketball gods, when you’re playing the game the way our guys were playing, sometimes they favor you,” Bickerstaff said. “That shot showed favor.”

The Raptors pushed back ahead, and Anunoby’s 3 made it 101-96 with 1:43 left. Allen scored back-to-back baskets to make it a one-point game, and the Cavs got possession with 24.8 seconds left after Barnes couldn’t grab the rebound on VanVleet’s missed 3.

Anunoby fouled a driving Garland, and the Cavs guard made both to give his team its first and only lead of the game.

Toronto called timeout, but Anunoby and Barnes couldn’t deliver the winning basket.

Up 29-28 after one, the Raptors widened their lead with an 11-2 run to start the second quarter and took a 57-48 advantage into halftime.