ORLANDO, Fla. (AP) Maybe it's a mark of the Orlando Magic's progress that they weren't particularly happy with the way they played in a victory against one of the hottest teams in the NBA.
Evan Fournier hit a short bank shot with 14.2 seconds left and Tobias Harris made two free throws with 1.1 seconds remaining to help the Magic hold off the Houston Rockets 104-101 on Wednesday night.
''It's true we won the game, but the way we did it, I thought we could have done a little better,'' said Fournier, who scored 17 points. ''We struggled defensively in the fourth quarter. ... It was obviously very hard to guard these guys, but we played through it.''
More from FoxSports
Nik Vucevic's 21 points led six players in double figures for the Magic, who have won five of six. They have 17 wins, only eight fewer than all last season.
Marcus Thornton's 3-pointer missed at the final horn, ending Houston's three-game winning streak.
James Harden scored 10 of his 31 points in the fourth quarter to lead the Rockets, who rallied from a 14-point deficit to lead by one on two occasions late in the game.
Former Magic center Dwight Howard finished with 12 points and seven rebounds for Houston.
Harris had 19 points and six rebounds for Orlando, which shot 52.4 percent but turned the ball over six times in the final quarter.
''We got some stops at the end, and that's pretty much how we won today,'' Harris said. ''We've had some better (wins) than this. We were up 13 points in the fourth quarter and we kind of let them slip back in.''
Aaron Gordon, who had scored 14 points in the five previous games, came off the Orlando bench with 14 points in a 7-minute span of the second quarter, helping the Magic (17-12) to a 59-53 lead following a first half in which the Rockets shot 52 percent.
Houston missed its first five shots of the second half and fell behind 65-53, but Trevor Ariza hit two straight jumpers and then Harden scored four consecutive baskets to keep the Rockets in it.
Harris and Elfrid Payton combined for 12 points to help the Magic finish the quarter on an 18-9 spurt to lead 87-74. Harden hit two straight shots and fed Howard for a dunk during a 13-0 Houston run, and neither team led by more than three points over the final 5 1/2 minutes.
The loss was only the fifth in 15 games for Houston (15-15).
''We can't have mental lapses where we do everything the right way for a couple possessions and go back to just taking it easy on teams,'' Howard said. ''We have to do a better job of playing the same way for 48 minutes.''
OFF THE LINE
Harden, who averages a league-leading 11 free throws per game, was held to six attempts by the Magic - only two after the first quarter. ''He's maybe the best of all-time at drawing fouls; he has such a knack for it,'' Magic coach Scott Skiles declared before the game. ''We're going to foul him, but we have to try and limit that.''
Rockets: Coach B.J. Bickerstaff protested that the Magic held Harden on the final possession, preventing him from getting the ball. ... Ty Lawson returned from a two-game suspension, playing almost 27 minutes and scoring 11 points. ... All six of Howard's field goals came on dunks.
Magic: Orlando is 27-27 against Houston, not including the Rockets' sweep in the 1995 NBA Finals. ... Victor Oladipo shot 0 for 9 with seven rebounds and six assists. ... The Magic, who lost in overtime at Houston on Nov. 4, have won 11 of 15.
Houston hosts San Antonio on Friday night.
Orlando hosts Miami on Saturday night.