HOUSTON — After scoring 58 points, James Harden pointed to the Houston Rockets’ defense and team effort.
Harden also had 10 assists and 7 rebounds and the Rockets overcame a 21-point third-quarter deficit to beat the Miami Heat, 121-118, Thursday night.
‘‘We were lackadaisical on defense, especially in that second quarter,’’ said Harden, who will be at TD Garden Sunday afternoon as the Rockets come to town to face the struggling Celtics.
‘‘They gained confidence and knocked down shots. They were just too comfortable, so we had to pick the pressure up in the second half, create some turnovers and energy with our defense.’’
He fell 3 points short of his career high set at New York Jan. 23, and had the most points ever against the Heat — surpassing Willie Burton’s 53 for Philadelphia on Dec. 13, 1994.
‘‘We get the stat sheet at the end of the game, and I saw he had 58,’’ said teammate Austin Rivers. ‘‘All of us were like, ‘He had that many points?’ We had no idea he had that many points. That’s a lot of points. He was incredible.’’
Harden made 8 of 18 3-pointers and was 16 of 32 overall from the field and 18 of 18 on free throws.
‘‘I wanted to be aggressive and continue to attack the rim,’’ Harden said. ‘‘I took my shots when I had the opportunities, and not only myself, but Austin, Gary [Clark], Chris [Paul] made some plays down the stretch. It was a total team effort tonight.’’
Rivers scored 17 points, and Paul and Clark each had 14 to help Houston win its fourth straight game. The Rockets shot 49 percent, including 19 of 46 on 3-pointers.
Houston held Miami to 20 points in the fourth quarter, outscoring the Heat by 15 in the decisive quarter.
‘‘I just really think it was a big win for us,’’ Houston coach Mike D’Antoni said. ‘‘Just for a lot of reasons — spirit-wise, we did it the right way. We got into them defensively. This is a character win, and when you get in the playoffs, that’s what counts.’’
Kelly Olynyk and Goran Dragic each had 21 points for Miami, Justise Winslow added 19 points and 8 assists, and Josh Richardson had 18 points. The Heat shot 52 percent, making 15 of 28 3-pointers.
‘‘We were in the driver’s seat and had an opportunity to close it out and really buckle down defensively, and we started to foul,’’ Miami coach Erik Spoelstra said. ‘‘Double-digit lead, and all of a sudden you look up and they were right there. That was probably more deflating than anything.’’
Miami was coming off a home victory over Golden State Wednesday night on Dwyane Wade’s banked 3-pointer at the buzzer.
With Houston down, 113-103, after Dragic’s 3-pointer with 6:18 remaining, Harden scored 10 points on a 14-0 run that made it 117-113.
Miami had a chance to regain the lead after Paul missed a 3-pointer, but Wade missed a jumper, and Richardson missed a 3-pointer. Paul hit a jumper with 46 seconds left to finish the scoring.
‘‘Obviously, he had the ball a lot and his teammates made timely plays when they needed to,’’ Wade said. ‘‘They just got it going, and defensively, we weren’t as good as we were early on in the game when we had that lead, and that allowed them to come back.’’