Toronto went 2 for 10 from the free-throw line in the fourth quarter. And there were other stumbles as the clock wound down.

"It was a lot of opportunities that we didn't cash in on," said Casey.

LeBron James scored 27 points and Dwyane Wade added 22 as Miami hung on for the win.

DeMar DeRozan had 25 and Rudy Gay 21 for Toronto (6-9), which has lost two in a row and four of its last six. The Raptors led once — 8-7 in the first quarter.

Miami led 57-43 after a half that saw Toronto shoot 37.5 per compared to the Heat's 57.1 — thanks to 30 points in the paint from the visitors. It also helped that the Heat made 6-of-12 three-pointers in the first half while Toronto was good on only 4 of 17.

Toronto, down by 20 in the third and trailing 78-70 going into the final quarter, made it close with its late rally but Miami survived a frenetic fourth that saw desperate defence from both sides.

Wade saw the win as a confidence- and character-builder, a game "where everything is going great for you and then it doesn't."

"How can you hold on, how can you figure out a way through all the adversity to continue to believe in the game plan and find a way to win?"

The Heat (13-3) has lost just once in 13 outings since opening the season at 1-2.

Miami's mastery over the Raptors now stands at 13 straight games. Toronto's last win against the Heat was a 111-103 decision on Jan. 27, 2010, at the Air Canada Centre.

The Raptors' current all-time losing streaks against an opponent are the Bulls (15), Suns (14) and Heat and Pacers (13).

Wade and James combined to score the first 13 points— and 15 of the first 17 — for Miami in the second half as the Heat stretched its lead. But Toronto's DeRozan and Gay gradually chipped away at the lead, cutting it to eight as the third quarter ended.

Toronto outscored Miami 27-21 in the third and 13-12 in the fourth.

Heat finish up

James' synopsis of the game was simple.

"We made our run and then they made their's. At that point, it's how you counter that. For us as a veteran ball club, it's going to happen. We would have loved to push that huge lead up in the third, just keep it going. But they've got some good players. They got stops, we turned the ball over, we didn't execute and they got back into the game. But we finished it up."

And Toronto failed to take advantage at the free-throw line.

James was nursing a sore finger, back and leg by the end of the night.

"I got pretty banged up today. I'm glad we got a day off (Saturday), I can try to get back in order."

Baskets were hard to come by as the fourth quarter began with Chris (Birdman) Andersen flying though the air to block a DeRozan shot. A Kyle Lowry three-pointer made it 80-75 as Miami went cold. James returned to the fray but Toronto kept coming with a DeRozan jump shot cutting the lead to 83-79.

A Gay layup reduced the deficit to two, at 83-81 with 4:22 remaining.

Former Raptor Chris Bosh fouled out with 1:37 remaining with four points, five rebounds and one assist.

Wade and James combined to score the first 13 points— and 15 of the first 17 — for Miami in the second half before Toronto launched its run.

Casey saw positives in the loss

"The way we played the second half, and I told the team in there, shows we can play with anybody. That's the best team in the league and they were throwing their best haymakers down the stretch.

"But there's two halves. We can't play one half and expect to beat anybody."

Heat coach Erik Spoelstra hinted his team was frustrated at the officiating in the second half. "But we gathered ourselves the last two and a half minutes and played through it and were able to execute and come away with the win."

"Clearly we were a different team once we were up 20 from where we were going down the stretch the last 10-12 minutes," Spoelstra added. "That's something we constantly have to work at. Stay on edge. Most of it is mental, most of it with us and that's the challenge."

Unlikely matchup

Friday's game featured an unlikely matchup of division winners, with two-time defending champion Miami leading the Southeast and Toronto topping the less-competitive Atlantic.

Miami led by as much as nine in the first quarter but Toronto, showing some muscle under the basket, closed the gap to two before Miami responded. The Heat led 27-22 after a quarter that saw the two teams combine for 12 turnovers.

Bosh was booed during introductions but quieted the crowd with an early dunk. Wade dipped into his bag of tricks several times early on.

DeRozan had Toronto's first six points.

James didn't try a shot until almost six minutes into the game but it was worth the wait — a reverse slam dunk from a long pass from Wade that had the crowd gurgling while giving Miami a 16-8 lead.

Even when the Heat failed, as during a 24-second violation in the first quarter, they entertained with their ball movement.

A 7-0 run early in the second quarter and some flashy baskets from Wade padded the Miami lead to 13 with James on the bench. James returned in style midway through the quarter, with an ally-oop from Bosh for his second bucket. He then made a three-pointer and came up limping after being fouled by Tyler Hansbrough, making one of two subsequent free throws.

James celebrated another ally-oop, this time from a Ray Allen feed, after a dazzling DeRozan run at the basket just kissed. The highlight-reel play put James into double figures for the 511th straight game.

To encourage thoughtful and respectful conversations, first and last names will appear with each submission to CBC/Radio-Canada's online communities (except in children and youth-oriented communities). Pseudonyms will no longer be permitted.

By submitting a comment, you accept that CBC has the right to reproduce and publish that comment in whole or in part, in any manner CBC chooses. Please note that CBC does not endorse the opinions expressed in comments. Comments on this story are moderated according to our Submission Guidelines. Comments are welcome while open. We reserve the right to close comments at any time.

Note: The CBC does not necessarily endorse any of the views posted. By submitting your comments, you acknowledge that CBC has the right to reproduce, broadcast and publicize those comments or any part thereof in any manner whatsoever. Please note that comments are moderated and published according to our submission guidelines.