MIAMI (AP) – Any win on the road is a good one, though Jimmy Butler really liked the way the Miami Heat got their latest.

Down seven with 1:45 to play, they had to play almost perfect — and on defense, they sure did.

“I think we finally showed ourselves what we’re capable of when we guard,” Butler said. “If we don’t make shots the way we normally make shots, there’s still a way to win and we have to find that way to win. Tonight was a prime example of that.”

Goran Dragic scored 24 points, including a three-point play that kicked off a closing 10-0 burst, and Butler added 20 as the Heat rallied to beat the Brooklyn Nets 109-106 on Sunday.

Bam Adebayo had 17 points and 16 rebounds for the Heat, who trailed 106-99 but pitched a shutout from there and got the victory thanks largely to the aggressiveness of Butler. He kept attacking the rim and had five free throws in the closing run, overcoming his 5-for-17 shooting from the field.

“What it shows is the mental toughness of great players,” Heat coach Erik Spoelstra said. “The ball was not going in all night long but when it really gets to crunch time, when you need a bucket or it is going to be game over, he can put it aside, compartmentalize, and make the big plays. He did that.”

Spencer Dinwiddie scored 29 points and Harris had a season-high 25 for the Nets, who had won six of their previous eight games. But this was one in which they missed the playmaking of Kyrie Irving, who missed his ninth straight game because of a right shoulder injury.

Without their All-Star guard, they couldn’t get into anything against the tough Miami defense down the stretch and had just one basket in the final 4-plus minutes.

“A few key possessions kind of got away from us,” Harris said. “We didn’t do just as good of a job as they did down the stretch to execute.”

There were 24 lead changes and 12 ties in the game, with the Nets leading 65-58 at halftime after David Nwaba’s 3-pointer with 1.1 seconds left.

Brooklyn’s lead was one midway through the fourth quarter before Harris made two 3-pointers in less than 30 seconds. Butler answered with a 3 for Miami, but Dinwiddie scored five straight to make it 103-95, the largest lead for either team all game.

It was 106-99 after another 3 by Harris with 1:45 to play, but that’s where the Nets’ scoring finished.

“We had opportunities, tons of opportunities. They made the plays, we didn’t. Just one of those see-saw games,” Nets coach Kenny Atkinson said.

(© Copyright 2019 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)