They spent more than two hours working on defence in an unusually long practice on Wednesday.

And on Thursday, the Miami Heat showed what they learned.

Bam Adebayo had 15 points and 14 rebounds, and the Heat put together their best defensive performance of the season in an 84-76 victory over the Toronto Raptors on Thursday night. The Raptors' scoring total was their lowest in more than four years — also coming in a game at Miami on Nov. 8, 2015 — and the second-lowest by any team in the NBA this season.

"We took it to heart," Adebayo said. "We need to defend and that's what we did tonight."

WATCH | Raptors struggle with their shots in loss to Heat:

Toronto shot 6 for 42 from three-point range in its 84-76 loss to Miami. 1:45

Tyler Herro and Goran Dragic each scored 13 points for Miami, which is now 2-0 against the Raptors this season and improved to 9-0 after a loss. The Heat and Milwaukee are the only teams to not lose consecutive games this season.

Derrick Jones Jr. scored 10 points and Jimmy Butler finished with eight points, 12 rebounds and seven assists for Miami.

"It was all about defence," Dragic said. "We feel like we play a great team defence, we help each other. Most of the time we were in zone. A great team win, let's go to the next one."

Dismal shooting undoes Raptors

Serge Ibaka had 19 points and 10 rebounds for Toronto. Kyle Lowry scored 15 points, Rondae Hollis-Jefferson added 13 and OG Anunoby had 12 points and 12 rebounds. The Raptors shot only 31.5 per cent and were 6 for 42 from 3-point range.

"If we make five more 3s we win the game," Lowry said. "Still, give them credit, a great game plan and a great job by them, but it's something we'll look at and figure out for next time. The next team who plays zone I'm sure we're not going to shoot that bad."

There was a pregame tribute and moment of silence for former NBA Commissioner David Stern, who died Wednesday at the age of 77. Both the Raptors and the Heat were born under Stern's leadership of the league.

"There probably is some serendipity to this game, to have the expansion of the league... it's a byproduct of his leadership and vision," Heat coach Erik Spoelstra said.

Miami set a season-best for points allowed by a huge margin; the previous Heat low in that department this season was 94 against New Orleans on Nov. 16. Toronto's previous season low for points was 88, in a loss to the Los Angeles Clippers on Nov. 11.

Anunoby was fouled on a 3-point try with 1:21 left in the third, making all three free throws to tie the game at 60. It was Toronto's second time cashing in on such a foul in the game, after Lowry went 3 for 3 in that situation late in the first quarter.

But the Heat went on a 17-5 run in the fourth and held Toronto to 16 points in the final 12 minutes.

"They didn't make much more than us, but they made just enough to get the win so give those guys credit," said Raptors guard Fred VanVleet, who was 3 for 16 from the field and 1 for 11 from 3-point range.