Tim Duncan had 10 points and 16 rebounds as San Antonio won its ninth straight game, recovering to beat Boston after blowing a 17-point, first-half lead.
Duncan also stopped Paul Pierce on the final play, forcing him into a fallaway jumper that bounced off the rim at the buzzer.
Danny Green scored 14 points, and Gary Neal had 13, including a 3-pointer with 2 minutes left that gave the Spurs the lead after Boston went on a 13-4 run to move in front.
Rajon Rondo had 17 points and 11 assists for Boston. The Celtics had won five in a row.
Pierce had 15 points and 10 rebounds, but he couldn't maneuver into open space after Boston inbounded the ball with 7.9 seconds left. Avery Bradley scored 19 points off the bench for Boston, and Kevin Garnett had 16 points, seven rebounds and five assists. Ray Allen returned after missing six games with a sore right ankle and added seven rebounds and five points, including a 3-pointer in the final minute.