Caris LeVert hit two key 3-pointers in the final minutes and Spencer Dinwiddie posted 26 points and a game-high 14 assists as the host Brooklyn Nets snapped a 7-game losing streak by rallying to defeat the Miami Heat 117-113 on Friday night.
Brooklyn's losing streak had been the NBA's longest active skid.
Miami, which got a game-high 33 points and 9 rebounds from Jimmy Butler, led 109-100 with 5:09 left in the fourth quarter before Brooklyn rallied.
LeVert had missed seven of his first eight 3-pointers before connecting late. This was just his third game back since missing eight weeks due to a thumb injury. His second 3-pointer -- with 69 seconds left -- gave Brooklyn a 112-111 lead. The Nets did not trail after that.
Miami center Bam Adebayo showed his versatility with 22 points, six rebounds and seven assists. Heat reserve point guard Goran Dragic added 17 points.
Dinwiddie hit 10 of 19 shots overall, including two of six 3-pointers. He had entered the game in a shooting slump; during his previous seven games, he shot 36.3 percent overall and 22.0 percent on 3-pointers.
The Nets also got 19 points from Rodions Kurucs and 17 points from Taurean Prince. LeVert finished with 11 points.
Miami played without point forward Justise Winslow, who missed 15 straight games due to a back injury before returning on Wednesday.
The first quarter must have been demoralizing for the Nets, who sank their first five 3-point tries and led by 10 points before surrendering their advantage rather quickly. By the end of the quarter, the Heat -- by virtue of its 65.2 shooting percentage -- led 42-32.
Miami finished the second quarter on a 9-2 run to take a 69-57 lead into halftime.
Brooklyn battled back to tie the score 89-89 by the end of the third quarter and then got the late boost from LeVert. Miami's Duncan Robinson missed a corner 3-point attempt that would have tied the score with 5.7 seconds remaining.