SAN ANTONIO -- Forward Carmelo Anthony returned to the New York lineup to score 27 points and grab 12 rebounds in the Knicks' 105-101 win over the San Antonio Spurs on Thursday night.
Anthony, who missed the past three games with sprained right ankle, was 10 of 20 from the field in 39 minutes.
New York (10-21) came into the game with the second-worst record in the league but shot 51 percent from the field.
The Knicks got 27 points from guard Iman Shumpert and 10 from center Andrea Bargnani. Forward Amare Stoudemire added 11 and center Tyson Chandler 10.
The Spurs trailed throughout the second half until center Tim Duncan's layup made it 98-96 with 2:02 remaining.
The Knicks, who had built a 11-point lead, took the lead back on a Shumpert putback that made it 103-101 with 23 seconds left.
Spurs guard Marco Belinelli tried to answer with another 3-point attempt with 14 seconds left, but the shot bounced off the rim and Knicks forward J.R. Smith grabbed the rebound.
Anthony then hit two free throw to ice the game for the struggling Knicks.
Belinelli had a season-high 32 points to led San Antonio (25-8). He was 12 of 16 from the field and made six 3-point shots.
Guards Tony Parker had 12 points and Manu Ginobili added 11 points and 12 assists as the Spurs suffered their first loss to a sub-.500 team this year.
It didn't look that way early for San Antonio when Ginobili connected on a 3-pointer with eight minutes left in the second quarter for a 38-29 Spurs lead. San Antonio hit 8 of 10 from beyond the 3-point line. From that point on, they went 1 of 7 behind the arc and ended the half with 10 turnovers.
New York, coming off four days' rest, got 30 first-half points from Anthony and Shumpert to go up 52-47 at the half.
The Knicks led the Spurs 26-25 after one quarter behind Shumpert's 11 points.
NOTES: Though the New York Knicks got F Carmelo Anthony back, they still have key players on the injured list. PG Raymond Felton (groin) was on the bench, and SF Metta World Peace (left knee) and PG Pablo Prigioni (right toe) did not travel with the team. ... San Antonio was 6-0 and averaging 112.3 points per game against Atlantic Division opponents. ... This was the opener of a three-game Texas swing for the Knicks. After playing San Antonio, they face Houston on Friday and Dallas on Sunday. ... San Antonio has a 57-9 home record when F Tim Duncan, G Tony Parker and G Manu Ginobili all score 15 points or more.