HOUSTON — James Harden was glad the Houston Rockets stepped up late defensively to get a win over the Brooklyn Nets on Saturday night.

However, Houston's star wishes it wouldn't have come to that.

Harden had 44 points and 10 rebounds and the Rockets built a big early lead and withstood a late rally from the Nets for the 108-98 victory.

Houston has won five of six games, with its only loss in the stretch coming in a surprising defeat by the Warriors on Christmas day.

The Rockets, who led by as many as 22, had a five-point lead before Austin Rivers scored all of their points in a 5-2 run that pushed the lead to 104-96 with about 2 1/2 minutes left. Spencer Dinwiddie added a layup for the Nets after that, but Harden hit a 3-pointer with less than a minute left to stretch the lead to 107-98.

“We were able to guard when we need to but we were up 22 points,” Harden said. “We've got to somehow, some way figure out how to maintain that earlier in the game and then we won't have to worry about it in the fourth quarter.”

Coach Mike D'Antoni said their struggles on offence later in the game helped give the Nets “life” to get back into it.

“We couldn't hit a shot for a while, but the last four or five minutes the defence was good,” he said. “You've got to be able to rely on defence when the shots don't go and I felt like tonight we did.”

Russell Westbrook and Taurean Prince were both ejected with about 20 seconds to go when they started yelling at each other after Prince fouled Westbrook.

The Nets were led by Dinwiddie, who had 17 points and 11 assists, and got 16 points each from Prince and Jarrett Allen as they lost their second straight.

“We gave ourselves a chance, but the other side of the coin is I don't think we're playing very well,” Nets coach Kenny Atkinson said. “That's the second game in a row where I feel like we're out of sync. I don't know what it is. We're just not in rhythm right now, especially offensively.”

A big run by the Nets allowed them to take a 1-point lead with about nine minutes left when Houston finally rediscovered its offence after cooling down following a hot start. The Rockets used a 10-2 spurt, with four points each from Harden and Westbrook, to make it 99-92 with about four minutes left.

Westbrook had 23 points, nine rebounds and seven assists, and Rivers added 14 points off the bench.

Brooklyn scored 14 straight points over the last minutes of the third quarter and the first minutes of the fourth to cut the lead to 88-86 with about 10 minutes remaining. Houston missed eight straight shots and had two turnovers to allow the Nets to trim the deficit.

Harden made one of two free throws with about 9 1/2 minutes left for Houston's first points since there were about two minutes left in the third quarter. The Nets then scored the next four points, with a tip-in layup by DeAndre Jordan, to go on top 90-89 for their first lead since early in the first quarter.

The Rockets led by double-digits for most of the game after a 42-point first quarter and were up by 16 late in the third. But the Nets scored the last seven points of the third quarter, capped by a 3-pointer from Rodions Kurucs, to cut the lead to 88-79 entering the fourth.

TIP-INS

Nets: Brooklyn made 11 of 39 3-pointers. ... Jordan had 12 rebounds and a block. ... Joe Harris scored 12 points.

Rockets: C Clint Capela sat out with a bruised heel. Coach Mike D'Antoni said he wasn't sure if he'd be ready to return on Sunday night. ... Isaiah Hartenstein tied a career high with nine points and had 13 rebounds. ... Houston out-rebounded Brooklyn 54-47, despite Capela's absence.

GORDON'S RETURN

Houston guard Eric Gordon is scheduled to return on Sunday night after sitting out for the last six weeks following arthroscopic surgery on his right knee. D'Antoni said he will be on a minutes restriction and expects him to play no more than 25 minutes in his first game back. Harden is thrilled that the team is getting Gordon back.

“That's another shooter and another ball handler and a guy that can be aggressive and make plays and it's just something that we were missing,” Harden said.

Gordon was averaging 10.9 points in nine games this season before he was injured.

UP NEXT

Nets: Visit Minnesota on Monday night.

Rockets: Visit New Orleans on Sunday night.

___

More AP NBA: https://apnews.com/NBA and https://twitter.com/AP_Sports