OKLAHOMA CITY -- After losing three straight games to start a long road trip, the Houston Rockets are grateful for any road win -- even a narrow one over the team with the NBA's worst record.
The Rockets blew a 15-point second-half lead, but Tracy McGrady capped a 26-point outing with two critical free throws with 8.2 seconds left as they edged the Oklahoma City Thunder 98-96 on Friday night.
Houston (23-15) closed its five-game road swing with two straight wins -- having also beaten defending NBA champion Boston -- and extended its winning streak over the Thunder franchise to 10 games, including seven when the Oklahoma City team played in Seattle.
Now the Rockets can take some momentum into an upcoming five-game homestand, which will start Saturday against the New York Knicks.
"We needed to get this win," Houston coach Rick Adelman said. "It's the end of this trip and it's been a long trip."
Houston's Yao Ming struggled much of the game, not making his first basket until early in the third quarter, missing a dunk later in that quarter and committing two offensive fouls in the fourth quarter. The 7-foot-6 center finished 3-of-10 from the field and scored 14 points -- well below his 19.8-point average -- but nine of those came in the final 4:22.
"We just beat the Celtics," Yao said. "You don't want to lose here. That was in my head."
Oklahoma City (5-32) had won two of its previous three home games and appeared poised to steal a win after tying the game on four occasions in the fourth quarter. But the Thunder never could produce the go-ahead basket despite numerous opportunities.
Oklahoma City's 21 turnovers helped negate the Thunder's 44-31 rebounding advantage.
"We have to get stops in the fourth quarter," Oklahoma City coach Scott Brooks said. "We have to learn to get good shots in the fourth quarter and not make turnovers in the fourth quarter. We still have to learn to close things out in the fourth quarter."
The Thunder, who had lost by double digits to the Rockets twice earlier this season, trailed by seven points early in the fourth quarter but were even with Houston at 93-93 after Russell Westbrook's jumper with 1:49 left.
"We had some unnecessary mistakes, and some of it may have been fatigue," Adelman said. "At one point, we were tired. But that's when you have to bear down. Our guys did a good job."
Two free throws by Yao put Houston up 95-93 with 1:36 left. The Thunder then missed three straight shots -- two by Kevin Durant and one by Westbrook -- and turned it over when Durant, who had 27 points, slipped and lost the ball out of bounds.
"I just have to make those 3s late in the game," Durant said. "Next time that opportunity comes around, I'll be prepared for it."
After Durant's second miss, Westbrook fouled McGrady with 8.2 seconds left, and McGrady made it 97-93, rendering Jeff Green's last-second 3-pointer meaningless. Rafer Alston hit 1 of 2 free throws with 0.1 of a second left.
"I've been in those situations plenty of times, so trying to get me out of my game and miss throws, that's not going to happen," McGrady said. "Playing with energy is what helped them stay close. They played harder than us tonight."
Houston missed its first seven shots as Oklahoma City jumped to a 19-10 lead, but 10 straight points by the Rockets closed that gap.
The Thunder's last lead came in the opening seconds of the second quarter, when Earl Watson's jumper put them ahead 26-24. Two straight layups by McGrady put the Rockets ahead and they limited Oklahoma City to 16 points in the quarter.
Oklahoma City was within 46-40 before Aaron Brooks hit a 2-pointer and a 3-pointer in the final minute of the half, then McGrady followed with a jumper to make it 53-40 at halftime.
Westbrook scored 15 points for Oklahoma City.
Veteran G Chucky Atkins, acquired by the Thunder in a trade with Denver earlier this week, participated in the team's shootaround Friday morning but didn't play against Houston despite being in uniform. Atkins said he hopes to learn enough of the Thunder's system to be able to play by Monday, when they visit New Jersey. ... Houston's Brent Barry skipped the game for personal reasons. The team excused his absence. ... Houston coach Rick Adelman said McGrady won't play on Saturday night against the Knicks. It will be the third straight time McGrady will have skipped the latter game when the Rockets have played on consecutive days ... Houston's Ron Artest didn't play for the third time in the last four games with a right ankle injury. ... Oklahoma City's Desmond Mason sat out with a strained back. Nick Collison replaced him in the Thunder's starting lineup ... The Thunder sold out the Ford Center, drawing 19,136 fans.