Two free throws from Jeff Green with 3.7 seconds left to play made all the difference as the Brooklyn Nets saw off the New York Knicks 114-112.
Green, who finished with 23 points, held his nerve to seal the win for Brooklyn, for whom Kyrie Irving poured in a game-high 40 points.
But it was not all good news, with the Nets losing superstar guard James Harden after just four minutes in his return from two games away with hamstring soreness.
Julius Randle was the pick of the Knicks, with 19 points, 15 rebounds and 12 assists, his fourth triple-double of the season.
The Dallas Mavericks recorded their fifth successive win and halted the Utah Jazz’s purple patch with a 111-103 victory.
Luka Doncic scored 31 points for Dallas and Dorian Finney-Smith added 23 as the division leaders sparred off.
A buzzer-beating three-pointer from Gary Trent Jr helped the Toronto Raptors to a 103-101 victory over the Washington Wizards, while the Minnesota Timberwolves welcomed D’Angelo Russell back after 26 games out for their 116-106 success over the Sacramento Kings, the returning guard scoring 25 points.
Elsewhere, Devin Booker scored 36 points as the Phoenix Suns saw off the Houston Rockets 133-130, the Cleveland Cavaliers swept past the San Antonio Spurs 125-101 and the Detroit Pistons overcame the Oklahoma City Thunder 132-108.