MILWAUKEE — The Houston Rockets had trouble at times holding on to the ball and keeping up with the young Milwaukee Bucks.

But as long as the Rockets keep hitting their 3-pointers, they’re pretty hard to beat.

James Harden scored 26 points, Eric Gordon had 18 points and two momentum-swinging 3s in the third quarter, and Houston beat Milwaukee 110-99 on Wednesday night at the Bradley Center for its 17th straight win.

The Rockets passed the Boston Celtics for the longest winning streak in the NBA this season. Houston hasn’t lost since Jan. 26 at New Orleans.

“We find ways to win,” Harden said. “It’s not going to be the same way every game.”

The latest victory came on the second of a tough back-to-back stretch of road games that started with a 10-point victory at Oklahoma City. No wonder the Rockets looked sluggish at times against the Bucks.

And yet the Rockets still led by 10 for most of the fourth quarter until a late surge by the Bucks sliced the lead to 104-99 with 1:06 left on rookie Sterling Brown’s layup.

Chris Paul answered with a short floater in the lane with 45 seconds left after driving on Jason Terry to silence Bucks fans who were pleading “Defense! Defense!”

Houston obliged after forcing the Bucks to waste 15 seconds on the ensuing inbounds pass and settle for an off-balance 3 that missed. The Rockets led comfortably from there.

“There were a few 50-50 balls or offensive rebounds that we needed to secure that if we do, it gives us an opportunity to run,” Bucks coach Joe Prunty said. “If we run, then maybe we can put them on their heels ... but the ball needs to move.”

Giannis Antetokounmpo scored 30 points. Khris Middleton finished with 18 points for Milwaukee, while Brown had a career-high 15.

“I thought we competed extremely hard tonight,” Prunty said. “We had great effort.”

Paul had 16 points and 11 assists for the Rockets, who answered every Bucks charge.

“We just got to lock in for all 48 minutes,” said Brown, a second-round draft pick of the Philadelphia 76ers out of SMU who was later traded to the Bucks.

Milwaukee used an 11-0 run to get within 73-69 with 3:25 left on Brown’s corner 3-pointer. The Bucks did most of their damage during the spurt around the bucket, with Antetokounmpo leading the way in the post.

The NBA’s most prolific 3-point shooting team countered with another display of clutch perimeter shooting.

The Rockets beat the Bucks down the floor to set up open shots on the wing. Gordon knocked down two 3s, and P.J. Tucker added another to help Houston close the third on a 14-7 run for an 87-76 lead.

“With a win streak like this you are doing a lot of things the right way,” Gordon said. “We still play for each other. We knew this was going to be a tough road trip.”

Houston got off to a sloppy start at the Bradley Center with a seven-turnover first quarter, a night after tying its season high with 22 turnovers in the win at Oklahoma City.

The end of the first half offered a glimpse of what was still to come. Harden hit a deep 3 just before the halftime buzzer from well beyond the arc with a defender in his face for a 58-46 lead.

“We’ve just got to stick with the game plan, close out, run them off the (3-point) line,” Brown said.

Bucks banged up

Milwaukee center Tyler Zeller (back) missed a second straight game and it does not appear as if Matthew Dellavedova (right ankle) will return soon.

The team initially estimated that the guard might miss a month when he got hurt on Feb. 4 at Brooklyn. The Bucks are also still without guard Malcolm Brogdon (left quad).

With Zeller out, the Bucks went stretches with the 6-foot-11 Antetokounmpo playing center to try to put a quicker lineup on the floor to counter the Rockets.

Houston still ended up hitting 47 percent from the floor and 35 percent (14 of 40) from 3-point range, and held a 22-14 edge in fast-break points.

Up next

The Bucks look to improve to 3-0 this season over New York when the Knicks visit Friday.

Houston 24 34 29 23 — 110

Milwaukee 22 24 30 23 — 99

HOUSTON — Ariza 4-9 1-1 9, Tucker 3-3 0-0 9, Capela 4-7 2-10 10, Harden 8-20 7-7 26, Paul 5-12 5-5 16, Black 2-3 0-0 4, Mbah a Moute 4-6 1-2 11, Gordon 6-12 2-2 18, Green 3-10 0-0 7. Totals 39-82 18-27 110.

MILWAUKEE — Middleton 6-13 3-4 18, Antetokounmpo 12-20 6-9 30, Henson 3-5 0-0 6, Bledsoe 4-11 5-6 15, Snell 1-4 0-0 3, Parker 5-12 0-0 10, Terry 1-6 0-0 2, S.Brown 6-12 0-0 15. Totals 38-83 14-19 99.

3-point goals — H 14-40 (Gordon 4-8, Tucker 3-3, Harden 3-10, Mbah a Moute 2-4, Green 1-5, Paul 1-6, Ariza 0-4), M 9-28 (S.Brown 3-6, Middleton 3-7, Bledsoe 2-6, Snell 1-4, Parker 0-1, Terry 0-4). Rebounds — H 47 (Capela 8), M 38 (Middleton 12). Assists — H 22 (Paul 11), M 21 (Middleton, Terry 5). Total fouls — H 21, M 22. Technicals — M coach Prunty (defensive 3 second). Att. — 17,195.