HOUSTON — Chris Paul wasn't thrilled with how the Houston Rockets played Monday night.

The veteran was perfectly happy with the outcome though.

James Harden scored 28 points and the Rockets overcame a big early deficit to beat the Miami Heat 99-90.

"You have those games during the season where (you) win the game and move on ... out of 82 of them sometimes it's going to be ugly, but you just want to win," Paul said.

Miami led by double digits before halftime, but the game stayed close throughout most of the second half. It was tied with about three minutes left when Harden hit a 3-pointer just before the shot clock expired. That was the start of a 7-2 run that made it 95-90 with 38 seconds left.

James Johnson missed a 3-pointer on the other end, but Miami's Hassan Whiteside grabbed the rebound. Harden blocked his layup, and Houston added a dunk by Clint Capela with 18 seconds left.

"They did a really good job of trying to run you off the 3-point line," Harden said. "So that was kind of tough for us tonight, but defensively that second half we locked up, controlled the game and that was it."

Whiteside led the Heat with 22 points and 13 rebounds. The team was missing Goran Dragic for the second straight game because of a bruised left knee.

"They finished and finished in high fashion, making shots, and we struggled to get clean looks on the other end," Heat coach Erik Spoelstra said.

Houston was at full strength for the first time in a while with Trevor Ariza and Gerald Green back after serving two-game suspensions for an altercation with the Clippers. Ariza had three points and five rebounds in 29 minutes, but Green did not play.

Paul added 16 points as Houston won its third straight, and Eric Gordon had 16, too, despite continuing to struggle from long range. Gordon ranks fourth in the NBA with 136 3-pointers this season, but has gone a combined 0 for 16 the last two games.

Houston led by 3 entering the fourth, and the teams exchanged leads several times in the first few minutes of the quarter.

The Rockets led by a basket after a 3-pointer by Paul with about eight minutes left before Miami scored the next four points to go up 83-81. Houston then used a 5-1 spurt, with a 3 from P.J. Tucker and a dunk from Capela, to make it 86-84 with about five minutes left.

After ending Golden State's 14-game road winning streak with a victory in their last game, the Rockets looked sluggish early in this one and trailed by 14 during the first quarter. The Heat got a boost in the first quarter from Whiteside, who scored 14 points. The Rockets got going late in the first quarter and had cut the deficit to 50-46 by halftime.

"We get an emotional victory on Saturday and then ... we just didn't come out of the gates very well," coach Mike D'Antoni said. "But after that our defence was solid ... (and) it just came down to James and Chris just creating and getting buckets."

TIP-INS

Heat: Jones had three blocks. ... Josh Richardson finished with 12 points. ... Miami made 7 of 30 3-pointers.

Rockets: Capela had 14 points with eight rebounds. ... Paul had six assists and five rebounds. ... Monday was Houston's first win this season when scoring below 100 points after losing the first three. ... Houston made 15 3-pointers to improve to 25-4 this season when making at last 15.

PERFECTION

Houston improved to 18-0 this season in games where Capela, Harden and Paul all play, including 14-0 when starting those three with Ryan Anderson and Ariza. Monday was the first time since Dec. 31 D'Antoni has been able to use that lineup.

THEY SAID IT

Paul on the improvement of the Heat, who have won 9 of 12: "(Spoelstra's) really got those guys playing hard, playing with the right spirit and it was a really good test for us."

UP NEXT

Heat: Host Sacramento on Thursday night.

Rockets: Visit Dallas on Wednesday night.

___

More AP basketball: https://apnews.com/tag/NBAbasketball