J.R. Smith added 17 points, Jason Kidd had 14 and Tyson Chandler 13 for the Knicks (6-0), who trailed by 12 with 7 minutes left. They closed on a 22-11 run to remain the NBA's lone unbeaten team.
New York also snapped a nine-game skid in San Antonio.
Tony Parker led San Antonio (7-2) with 19 points and 12 assists. Kawhi Leonard added 16 points and Tim Duncan had 14 points and 14 rebounds.
Smith and Kidd hit consecutive 3-pointers to give the Knicks a 100-95 lead with a minute left.
HEAT 98, NUGGETS 93
DENVER (AP) — LeBron James had 27 points and 12 assists as the short-handed Miami Heat ended a decade-long drought in Denver.
Shane Battier added 18 points — all on 3-pointers — in the Heat's first win at Denver since Jan. 29, 2002, a streak of 10 straight losses. Every other NBA team has won at the Pepsi Center during that span.
The Heat nearly blew a 19-point second-half lead but held on despite being without Dwyane Wade (foot) and Mario Chalmers, who went to the bench after just 7 1/2 minutes with a strained right triceps.
Andre Miller had 19 points and Kenneth Faried led the Nuggets with 16 points and a career-high 20 rebounds. Ty Lawson, who is averaging 13.5 points, didn't score.
Lawson would have given Denver its first lead of the night with 5:35 remaining, but his basket was waived off when he was whistled for an offensive foul for running over Battier.
NETS 102, CELTICS 97
NEW YORK (AP) — Joe Johnson made the tiebreaking basket with 3:03 left, Deron Williams and Brook Lopez each scored 24 points, and Brooklyn won its fourth straight.
Williams had eight assists and made all nine free throws on a night Paul Pierce had two huge misses in the final minute for the Celtics, who played without injured point guard Rajon Rondo.
Johnson finished with 19 points and eight rebounds for the Nets in front of a sold-out crowd of 17,732.
Pierce scored 22 points and Leandro Barbosa had 17 in place of Rondo, who was out with a sprained right ankle. Kevin Garnett added 14 points but Boston had its three-game win streak snapped and lost to the Nets for just the third time in 21 meetings.