Karl-Anthony Towns had 25 points and 16 rebounds, Jalen Brunson scored eight points down the stretch and finished with 17 as the New York Knicks beat the Brooklyn Nets 99-95 on Tuesday night.

OG Anunoby scored 20 points and Precious Achiuwa had 11 points off the bench as the host Knicks won their second straight game.

D’Angelo Russell finished with 23 points and 10 assists and Cam Johnson scored 16 for the Nets, who have lost four straight games and nine of their last 10.

New York had a double-digit lead in the third quarter before the Nets rallied and moved out to a one-point lead at 88-87 on a 3-pointer by Keon Johnson with 5:18 left.

The Knicks battled back and took the lead 91-90 with 2:18 left on a jumper by Brunson, who ended up making three straight shots, including a step-back jumper with 1:25 to play to put the Knicks ahead 95-92.

Russell answered with a 3-pointer to cut the Brooklyn deficit to 97-95 with 52 seconds left. Johnson then missed a 3-point try before Brunson sealed the win with a pair of free throws.

NUGGETS 144, 76ERS 109: Nikola Jokic had 27 points, 13 rebounds and 10 assists for his 19th triple-double of the season, reserve Aaron Gordon was nearly perfect from the floor and Denver handed visiting Philadelphia its seventh consecutive loss.

BLAZERS 116, HEAT 107: Anfernee Simons scored 24 points, Deandre Ayton had 22 points and 15 rebounds, and Portland won at Miami. Jerami Grant finished with 18 points and Deni Avdija added 16 for the Blazers, who lost by 60 the last time they played in Miami on March 29.

RAPTORS 109, MAGIC 93: Scottie Barnes had 17 points and 11 rebounds, RJ Barrett scored 19 points and Toronto overcame a 21-point deficit at home to beat struggling Orlando. Gradey Dick scored 17 points and Bruce Brown had 15 as Toronto snapped a four-game losing streak against Orlando.