Rookie George Hill, playing in place of Tony Parker at point guard for the Spurs, added 17 points to help San Antonio
- down 14 points with 7:37 to go - improve to 3-5.
Houston's Ron Artest missed a 3-point try at the buzzer.
Artest led Houston with 18 points. Brooks, playing at point guard in place of the suspended Rafer Alston, had 14.
The Rockets ended a five-game trip 2-3 and fell a half-game behind New Orleans in the Southwest Division.
Houston led by 14 points when Brooks scored with 7:37 left in the game.
But the Spurs regained the lead with 59 seconds left on Duncan's layup over Yao Ming as the San Antonio offense cleared out the middle for Duncan to drive 1-on-1.
But after McGrady's miss, San Antonio failed to take advantage when Duncan missed a hook over Yao. Brooks then tried a baseline drive that Duncan blocked.
Brooks replaced Alston in the starting lineup. Alston sat out the first of his two-game suspension
- he'll also miss Saturday against New Orleans - because he charged at the Suns' Matt Barnes during a fight Wednesday night in Phoenix.
McGrady was spared a suspension for his part - he pushed Suns guard Steve Nash
- but he picked up a $25,000 fine.
San Antonio again played with All-Star backcourt Parker and Manu Ginobili in street clothes. Both are scheduled to sit until sometime in December with injured left ankles.
Holding just a 43-40 lead at halftime, Houston went ahead by nine after San Antonio shot 33 percent in the third quarter.