NEW YORK — Down by 16 points early in the second half against the Heat, the Nets dug in on defence.

DeMarre Carroll tied a career-high with 26 points, Spencer Dinwiddie had 15 and the Brooklyn beat Miami 101-95 on Friday night.

Brooklyn snapped a five-game losing skid at Barclays Center and a seven-game home losing streak to the Heat. The Nets also improved to 11-1 when holding opponents under 100 points this season.

The Heat led 64-48 with 8:53 left in the third quarter but scored just five points the rest of the period as Brooklyn closed to within two.

"What were we up by, like 16 or so?" Miami's Hassan Whiteside said. "I think that was really the turning point of the game because it should've been over, you know, you up 16 against a team in the third quarter. Shouldn't be no way they come back from that. We've got to do a better job of playing with a lead and it shouldn't have even come down to the fourth quarter."

Whiteside had 21 points and 13 rebounds, and Goran Dragic scored 17 points for the Heat.

Caris LeVert and Joe Harris each added 12 points for the Nets. D'Angelo Russell played 14 minutes and went 0-for-5 from the field for Brooklyn in his first action after missing 32 games following left knee surgery.

LeVert made an acrobatic layup to give the Nets a 95-91 lead with 57.8 seconds remaining and then made a step-back jumper to ice the game at 97-91.

"I thought Caris and Quincy (Acy) came in the game and changed the energy," Nets coach Kenny Atkinson said.

Carroll hit a 3-pointer from the wing to give Brooklyn an 89-86 lead with 4:19 left.

"There were so many big plays," Atkinson said. "At the end of the day, this is a player's game. DeMarre hits a big three, Caris and Spencer have two big-time drives in the pick-and-roll and we made plays, but more importantly we got stops."

Brooklyn took a 79-77 lead with 8:57 remaining on a corner 3-pointer from LeVert. It was Brooklyn's first lead since the 5:41 mark of the first quarter.

Whiteside led Miami with 15 points and eight rebounds at the half as the Heat took a 53-43 lead into the locker room. Carroll led Brooklyn with 11 points at the half.

TIP-INS

Heat: Coach Erik Spoelstra praised Dragic before the game. "He means everything to our team. In our eyes, he's having an All-Star season. There's a reason why we are where we are in the East, and he's a big part of it." ... Isaiah Whitehead (G-League assignment) and Jeremy Lin (ruptured patella tendon) were out for Brooklyn.

Nets: Atkinson said Russell will play in short stints as he works his way back from left knee surgery. ... Tyler Johnson (left ankle), Dion Waiters (left ankle), Okaro White (left foot) and Rodney McGruder (left tibia) were out for Miami.

UP NEXT

Heat: Visit Charlotte on Saturday in the fourth of a five-game trip.

Nets: Begin a five-game trip at Detroit on Sunday.

___

More NBA basketball: https://apnews.com/tag/NBAbasketball