The Rockets have been blowing fourth quarter leads this season and the Thunder have been pulling out games in the closing minutes.
Before the loss, Oklahoma City had been 8-0 in games decided by seven or fewer points and 3-0 in games decided by one point.
"We knew it was going to come down to the wire just the way it was going," Martin said. "In the third quarter, they would make a run, then we would make a run, so that's what we've been practicing and I'm just glad it paid off tonight."
The Thunder trailed most of the game but rallied in the fourth quarter and took it down to the final second, when Kevin Durant missed a short jumper.
The loss snapped Oklahoma City's five-game road winning streak and extended its losing streak to 11 in a row at Toyota Center.
"It's just a great win," Rockets coach Rick Adelman said. "It was a very good team we played. They were going to attack and keep coming at us but we did enough to win and that's what we wanted. We wanted our guys to play hard for 48 minutes and that's what they did."
Battier scored 18 points and hit three of his 3-pointers in the third quarter to help the Rockets maintain the lead. Houston was 10 of 17 from 3-point range. Kyle Lowry scored 14 points and Luis Scola added 13.
Russell Westbrook led Oklahoma City with 23 points, including 10 in the third quarter when the Thunder rallied from a 50-42 halftime deficit for a brief 63-61 lead with 5:27 to go in the period. Westbrook also had 10 assists.
|More on Thunder at Rockets|
|Facts & Rumors|
The Rockets held Durant, the NBA's leading scorer, to 18 points, well under his 28.1 average entering the game. Battier got the big assignment against Durant.
"That's a tough assignment chasing that guy around all over the place but I tried to tell Shane that he's been pretty much getting nothing but stand-still 3s," Adelman said.
The Rockets took a 77-71 lead into the fourth quarter.
Oklahoma City never led in the fourth but cut it to 99-98 with 30 seconds to play on a basket by Westbrook. Lowry missed a shot with 5 seconds left and Thabo Sefolosha got the rebound before Durant's final attempt.
"It felt great when it left my hand," Durant said. "It's very frustrating. It's tough for me that it came up short. I've only had one (game winning shot) in four years in this league. Every one of my shots felt good. It was just one of those nights."
The Thunder haven't won at Toyota Center since an 87-85 victory on Feb. 22, 2005.
Serge Ibaka scored 12 of Oklahoma City's first 14 points, but Scola had 11 points and Martin added eight in the first quarter, and the Rockets held a 33-25 lead at the end of the period.
"We battled back and no one on our team gave up and we had a shot to win," Thunder coach Scott Brooks said. "Kevin's shot was on line but just a little short. We had a chance to win down the stretch."
Houston stretched the lead to 37-25 to open the second quarter, its biggest lead of the first half. The Thunder cut it to eight in a cold shooting quarter for both teams, and the Rockets held a 50-42 lead at halftime.
|Kevin Martin helps the Rockets out by pouring in 23 points in a nail-biting win over the Thunder. (Getty Images)|
|Oklahoma City (11-6)||25||17||29||27||98|
|Houston (5-11) «||33||17||27||22||99|
|OKC:R. Westbrook 23 Pts
OKC:S. Ibaka 8 Reb
OKC:R. Westbrook 10 Ast
|HOU:K. Martin 23 Pts
HOU:B. Miller 7 Reb
HOU:K. Lowry 8 Ast
|Players of the Game|
James Harden Rockets Name and Number T-Shirt - Red Shop Now!
|J. Green, PF||39||6-13||1-2||7||1||2||15|
|K. Durant, SF||38||7-18||2-4||2||3||1||18|
|R. Westbrook, PG||36||10-19||3-6||4||10||2||23|
|T. Sefolosha, SF||31||1-5||4-4||5||1||3||6|
|S. Ibaka, PF||23||7-7||2-3||8||0||4||16|
|J. Harden, SG||29||3-8||3-4||2||0||2||10|
|N. Collison, PF||20||3-4||0-0||4||0||4||6|
|D. White, PF||12||1-2||0-0||3||0||2||2|
|E. Maynor, PG||12||1-3||0-0||1||4||2||2|
|M. Peterson, SG||Did Not Play|
|N. Krstic, C||Did Not Play|
|R. Ivey, PG||Did Not Play|
|D. Cook, SG||Did Not Play|
|B. Mullens, C||Did Not Play|
|C. Aldrich, C||Did Not Play|
|Complete Box Score|
|K. Martin, SG||40||9-21||3-4||2||4||1||23|
|K. Lowry, PG||38||5-12||2-4||6||8||3||14|
|S. Battier, SF||36||7-11||0-0||6||1||0||18|
|L. Scola, PF||33||5-14||3-3||6||2||2||13|
|C. Hayes, PF||22||2-5||1-2||5||3||1||5|
|B. Miller, C||25||4-6||2-2||7||4||1||11|
|J. Hill, PF||16||5-10||2-5||7||1||5||12|
|C. Budinger, SF||12||1-4||0-0||0||1||2||3|
|I. Smith, PG||10||0-1||0-0||2||2||0||0|
|C. Lee, SG||8||0-0||0-0||3||0||1||0|
|J. Jeffries, PF||Did Not Play|
|Y. Ming, C||Did Not Play|
|A. Brooks, PG||Did Not Play|
|J. Taylor, SG||Did Not Play|
|P. Patterson, PF||Did Not Play|
|Complete Box Score|