SAN ANTONIO - After letting a 23-point lead slip away and struggling to stop the Spurs in the third quarter Saturday night, the Rockets rallied in the final seconds to defeat San Antonio 112-106 and snap a seven-game losing streak at the AT&T Center.

With some late-game heroics, including clutch free throws from Dwight Howard, a momentum-stealing dunk from Chandler Parsons and a healthy dose of James Harden returning to form, the Rockets (13-5) won a game that might have been a loss a few weeks ago.

"A month ago, we might not win that game," coach Kevin McHale said. "But I've seen the improvement. And I think this was a good win for us."

Several Rockets, including Howard and Harden, have pointed to the Spurs as a team to emulate, and in the first quarter, the Rockets beat them at their game. They moved the ball well, were accurate from behind the 3-point line and had great bench production.

Early lead

Things were going so swimmingly that the Rockets led 55-32 midway through the second quarter.

"I liked a lot of what we did early in the game," Howard said. "The way we came out and really put together a big run and played our game. To do that against a really good team like the Spurs is tough."

To maintain that type of play against a team like the Spurs is tough, as well. Late in the second quarter came the Tony Parker show. The five-time All-Star scored 10 points to fuel a 14-0 Spurs run, and just like that, the big lead dwindled.

And in case the Spurs needed motivation for the second half, coach Gregg Popovich picked up a technical foul for yelling at McHale and the referees when his counterpart stood close to Tim Duncan on an inbounds pass.

In the third quarter, the Spurs chipped away, largely due to Duncan and Parker, who combined for 16 points in the quarter.

Just two minutes into the fourth quarter, the Spurs took the lead. That's when McHale went back to his starters. Just before they walked on the court to a five-point deficit with 8:32 left in the game, Howard told his teammates to just stick to the game plan and get back in it.

Immediately, Terrance Jones rebounded a Parker shot, passed to Parsons, who assisted a made Harden jumper. From there, the Rockets climbed back.

Howard steps up

Some of the issues that have plagued the Rockets this season crept up again, like the Spurs going to Hack-a-Howard late in the game. But it didn't work. Howard was 5-of-8 at the line and made his last four in a row.

Parsons had 25 points, including the dunk that gave the Rockets a four-point lead in the final seconds. After that, he was on the ground in pain with another of the back spasms that have been nagging him the last few weeks.

"Chandler was really in pain and he still made a big play," McHale said. "I think that was what these guys did tonight. They just battled through it all.