Iman Shumpert scored a career-high 27 points, including the tiebreaking tip-in with 23.4 seconds left, and Carmelo Anthony had 27 points and 12 rebounds in his return from injury as the Knicks surprised the San Antonio Spurs 105-101 on Thursday night.
Amare Stoudemire added 11 points and Beno Udrih and Andrea Bargnani had 10 each for New York (10-21), which snapped a three-game skid.
Marco Belinelli had a career-high 32 points, but missed a pair of 3-pointers in the final minute for San Antonio (25-8). Tony Parker had 12 points and Manu Ginobili added 11 points and 12 assists.
The Spurs dropped to 12-5 at home this season. They had won three in a row overall.
The Knicks' skid coincided with Anthony sitting out with a sprained left ankle, but the All-Star forward looked refreshed in revitalizing the team's struggling offense.
After scoring 23 points on 9-for-15 shooting in the first three quarters, Anthony was limited to four points in the final period while going 1 for 5. But those last four points were critical in a frenzied finish.
Following consecutive 3-pointers by Parker and Belinelli that pulled San Antonio to 96-94 with 3 minutes left, Parker's layup gave the Spurs a 98-96 lead.
Anthony tied the game with a driving layup, and Parker missed a contested layup. Shumpert then hit a 3 with 39.1 seconds remaining after the Knicks captured a loose ball that six players touched at one point.
Belinelli tied the game with a 3-pointer off an inbounds play drawn up during a timeout.
Shumpert then rose high above San Antonio's interior defenders to tip in a missed shot with 23.4 seconds remaining, giving New York a 103-101 lead. Belinelli missed a 3 and Anthony drained a pair of free throws to seal it.