HOUSTON -- Los Angeles coach Mike D'Antoni paid a lot of attention to former Lakers center Dwight Howard down the stretch.
The strategy worked perfectly, with Howard missing seven late free throws to allow the Lakers to keep it close before Steve Blake hit a wide-open 3-pointer with 1.3 seconds remaining to lift them to a 99-98 victory Thursday night.
"I think it went real well because we took Harden out of the game," D'Antoni said.
Howard spurned the Lakers to sign an $88 million deal with Houston, joining Harden and a team that made the playoffs last season for the first time since 2009.
A somber Howard called his free throw shooting "terrible" but wouldn't concede that this loss was more difficult because it was against his former team.
"Every loss hurts," said Howard, who had 15 points and 14 rebounds. "Nobody likes to lose. It's very upsetting that we lost the way we did."
D'Antoni's decision to foul Howard was surprising because last season he said the hack-a-whoever defense was bad for the game.
"That doesn't mean you're not going to use it, if it's out there," he said. "I'm not crazy."
Houston led by two points before Blake took the inbounds pass from Jodie Meeks and made the game-winning shot.
The Rockets were disappointed they let Blake get free for the winning basket.
"Guys just kind of messed up on the play," Howard said. "It happens."
The Rockets had a chance to win it, but Patrick Beverley's 3-point attempt at the buzzer bounced off the backboard.
"I was in a rhythm, and then they started fouling Dwight," said Harden, who scored 35 points. "It kind of slows us down. It slows our pace down and what we like to do. Good coaching."
The Rockets took their first lead since the first quarter on a dunk by Chandler Parsons following a steal by Harden that made it 93-91 with about four minutes left. Parsons left his arms outstretched as he came down from the dunk to wild applause from the home crowd. Harden had tied it up about a minute earlier on a 3-pointer.
The Lakers started fouling Howard every time he touched the ball after that, sending him to the line 12 times, but he made just five.
Meeks, who led the Lakers with 18 points, made a 3-pointer with less than two minutes remaining to cut the lead to two.
The Lakers struggled all last season amid reports that Howard and Kobe Bryant didn't get along, and were swept in the first round of the playoffs. Los Angeles could have offered Howard a five-year contract worth $118 million, but he chose to make the move to Houston with a four-year deal.
"He made his choice, which is good," D'Antoni said of Howard. "You've got to respect that. He's fine, and they're going to have a great team. You're just happy for everybody because we won."
The Lakers extended their lead to 14 points on a jump shot by Chris Kaman with about eight minutes left in the third quarter. Houston finally got its offense going after that, going on a 15-3 run to get within 74-72 with three minutes left in the quarter.
A highlight in that span came when Howard bobbled a bad pass from Harden before getting a handle on it and spinning around to finish with a dunk. The Rockets got eight points from Jeremy Lin during that run, and the Lakers had three turnovers.
Wesley Johnson made a 3-pointer to cool off the Rockets, but a 3-pointer by Harden just near the end of the quarter cut the lead to 81-77.
Houston shot just less than 35 percent and made just two of 13 3-point attempts in the first half. But the Rockets stayed in the game by making 18 of 27 free throws -- 25 in the second quarter alone -- before halftime. The Lakers didn't share in Houston's long-range shooting woes in the first half, hitting 11 of 14 3-point attempts.
The Lakers led by 17 points early in the second quarter before Houston used a 13-5 spurt capped by seven points from Harden to cut the lead to 45-36 about 7 1/2 minutes before halftime.
Harden's seven points came in just 35 seconds. He made the second of two free throws before hitting a 3-pointer seconds later. Howard got a rebound on the other end, and Harden made a layup. He was fouled on the shot and made the free throw.
Harden made five more free throws in the last 1:19 of the first half, but 3-pointers by Steve Nash and Meeks extended the Lakers' lead to 64-50 at halftime.
Former Rockets star Tracy McGrady and current Houston Texans J.J. Watt and Andre Johnson attended the game. ... Meeks made the first four 3-pointers he attempted to tie a career high for most 3-pointers made without a miss.