With numerous Knicks alumni in the crowd, New York (23-33) stopped a four-game losing streak in putting forth its finest defensive effort of the season, holding the Spurs to 36 percent shooting.
Anthony was the subject of bizarre tweets earlier in the week from Knicks president Phil Jackson as trade rumors continue to swirl around the veteran forward. Then on Wednesday, former forward Knick Charles Oakley was escorted out of Madison Square Garden and arrested and charged with assaulting security guards after allegedly verbally abusing Knicks owner James Dolan.
Except for a brief tie at 81-81, New York held the lead for the entire fourth quarter. Anthony scored 10 points in the final period.
"I think the trust in each other came out tonight," said Knicks coach Jeff Hornacek, who was critical of his team's effort, especially the starters, this week. "You saw guys get up on the ball, and when they got beat, they rotated."
Derrick Rose added 18 points and Kristaps Porzingis contributed 16 points, seven rebounds and four blocks for the Knicks, who finished 1-4 on the homestand and won for just the fourth time in the last 13 games.
New York's Willy Hernangomez making only his second start at center this season, scored 12 points and pulled down nine rebounds.
"I think right from the start, (Hernangomez) has had a good understanding," Hornacek said. "He moves to the right spots and gets to the right area. He's a big body. It's not easy to move him."
Kawhi Leonard paced the Spurs (41-13) with 36 points and added nine rebounds and four steals. He scored 30-plus points for the seventh consecutive game. LaMarcus Aldridge added 15 points and 10 rebounds, and David Lee scored 10 points.
New York held the Spurs, the best 3-point shooting team in the league, to just 20.7 percent (6 of 29) from beyond the arc.
"I thought we were quick on the shots and a little contested," Spurs coach Gregg Popovich said. "They got into us good. They were a little physical. I just don't think we played wisely in that regard."
Leonard's jump shot cut the Knicks' lead to 88-86 with 1:43 remaining, but Anthony countered with two consecutive jumpers for a 92-86 Knicks lead with 33 seconds remaining.
New York opened the second half on an 11-0 run, five points coming from Anthony, to move ahead 51-48.
Leonard's 3-pointer knotted it 57-57, but Anthony brought the Knicks back with 11 points in the third quarter for a 69-65 New York advantage.
The Spurs went nearly four minutes without scoring early in the fourth quarter until Leonard sank a jumper to cut the Knicks' lead to 73-71 with 7:53 left to play.
Hernangomez's short jumper moved New York's lead to 80-75 at the 5:18 mark before Leonard scored four straight to pull the Spurs to within 80-79.
With the score deadlocked at 81-81, New York got a layup from Rose and a 3-pointer from Anthony for an 86-81 edge with 2:46 to go before the final sequence.
Leonard tossed in 12 points in the second quarter to help the Spurs to a 48-42 lead at the break. He scored six points in a row to give San Antonio a 46-34 cushion, its largest lead of the half.
San Antonio limited the Knicks to just 12 shots in the first quarter and led 21-18 entering the second.
-- Knicks C Joakim Noah missed his fourth game in a row due to left hamstring soreness.
-- Actor/director Spike Lee was wearing a Charles Oakley jersey at courtside in deference to the ex-Knick who was arrested and banned from Madison Square Garden last week during an altercation with security.
-- Knicks F Lance Thomas returned after missing 14 games with a fractured left orbital bone. He scored two points in 17 minutes.