Tim Duncan had 19 points and 15 rebounds, but the game began to turn when he was on the bench and the Spurs rallied from 19 points down to win 92-84.
Gregg Popovich benched Tony Parker along with Duncan and the rest of the starters after Houston built a 74-55 lead in the third quarter.
With the two All-Stars out, the Spurs mounted a 20-1 spurt, holding Houston without a field goal for eight minutes. Beno Udrih sank two 3-pointers and turned a steal into a breakaway layup to cut the Rockets' lead to 75-71 heading to the fourth.
"Our bench did one heck of a job to get us back in it," Duncan said. "Pop took us out because we were turning the ball over and not making shots. But our bench came in and they were the difference."
Reserves Michael Finley and Horry scored early in the fourth to cap the run and tie the game.
"Robert and Francisco and Beno, off the bench, were the reasons we ended up with this victory," Popovich said.
Shane Battier's 3-pointer with 8:56 left ended Houston's field-goal drought and put the Rockets up 78-75. But three minutes later, Manu Ginobili made a 3-pointer from the wing to put the Spurs up 82-79, their first lead of the second half.
At that point, the Rockets were on the verge of collapsing after a promising start. They shot 51 percent in the first half, then missed 13 consecutive shots after Rafer Alston's 3-pointer put them up by 19 with 4:57 left in the third.
The Rockets missed 11 of their first 12 shots in the final quarter and San Antonio surged to an 86-79 lead on baskets by Duncan and Ginobili.
Duncan ripped the ball away from Yao Ming at one end, then hit a decisive fadeaway jumper at the other to put the Spurs up 90-83 with 2:38 remaining. He also blocked three shots and put on what Popovich considered one of his best defensive performances ever.
Tracy McGrady scored 26 for the Rockets, but he had only five in the second half. Houston went 2-for-17 in the fourth quarter and was outscored 21-9.
"We stopped fighting," McGrady said. "When you've got a team down like that, you got to that point, you have to continue to execute and provided that kind of energy, because they're too good."
The Rockets made several offseason moves and are hoping to contend for the Western Conference crown. McGrady conceded that Tuesday's game shows how far Houston still has to go.
"In order for us to be at that level that San Antonio's at, we've got to learn how to close these types of games out," McGrady said. "Until we learn how to do that, we're going to be good, but we're not going to be San Antonio. Hopefully, we learn from this."
Ginobili scored 13 of his 19 points in the second half for the Spurs, who've won their opening four road games for the first time in franchise history.
The Rockets finished 32-of-84 (38 percent) from the field and were outrebounded 51-36.
McGrady seemed poised for a big night at the start, scoring 14 points in the first quarter. He came in shooting only 38.6 percent from the field, but made six of his first nine shots against San Antonio, including a pair of 3-pointers.
McGrady rested on the bench as the second quarter began and the Spurs turned a 27-21 deficit into a 32-31 lead.
McGrady returned with 6:40 left in the half and the Rockets retook the lead.
Houston finished the first half with a 7-0 run, sparked by Dikembe Mutombo. The 40-year-old Mutombo replaced Yao with 1:42 left before the break, blocked a shot by Duncan and tipped in a miss by Luther Head to give Houston a 53-43 lead.
McGrady drilled another 3-pointer and pumped his first just before the halftime buzzer to put Houston up by 13. He finished the half with 21 points, six rebounds and two assists.
"He looked like the usual Spur killer of all time out there," Popovich said of McGrady.
Yao had only 10 points at the break, then scored eight in the third quarter as the Rockets' lead bulged to 19.
- Juwan Howard had five points and six rebounds in place of injured Houston forward Chuck Hayes.
- Yao sported a long gash on his left biceps, a product of his duel with Shaquille O'Neal in Miami on Sunday.
- The Rockets' point total was a season low.
- The Rockets' seven-game losing streak to the Spurs is their longest active drought against one team.