The Toronto Raptors withstood a late surge from Houston to halt the Rockets’ 17-game NBA winning streak with a 108-105 victory Friday in a clash of conference leaders.

Kyle Lowry scored 30 points and DeMar DeRozan added 23 for the Eastern Conference-leading Raptors, who have already secured a playoff berth.

James Harden scored 40 points for the Rockets, who came into the game with the best record in the league but were out-scored 32-16 in the first quarter and trailed by as many as 19 in the first half.

“We were maybe surprised by the intensity or whatever,” admitted Houston coach Mike D’Antoni, whose Rockets hadn’t lost since January 26. “We didn’t quite come out with what we had the last three quarters.”

Despite the defeat, the Rockets maintained a half-game lead over Golden State atop the Western Conference after the reigning NBA champion Warriors were beaten 125-108 by the Trail Blazers in Portland.

Houston trailed by 15 at halftime and were down by 17 with less than five minutes to play in the third quarter.

Despite their struggles from three-point range, Houston chipped away and knotted the score at 102-102 on a three-pointer by Harden with 2:10 left.

DeRozan put the Raptors back up by two with a jump shot with 1:49 remaining and the Rockets wouldn’t get as close again.

Chris Paul finished with 14 points for Houston but missed a go-ahead three-pointer with 14.5 seconds to play.

After Jonas Valanciunas made two free throws to stretch Toronto’s lead to three points with 5.4 seconds left, Harden missed a last-gasp three-point attempt and the Raptors’ seventh straight win was in the books.

“We shouldn’t have even given him the opportunity to get the shot off, but it worked out,” said Lowry, who said the Raptors must find a way to maintain the level they showed in the first quarter throughout the game.

“We can’t be satisfied with big leads in the first quarter and let them go – we’ve got to find a way to continue to be strong.”

Short-handed Warriors fall

With Stephen Curry sidelined by a right ankle injury and Andre Iguodala, Jordan Bell and David West also sidelined, Golden State’s Kevin Durant stepped up with a 40-point performance in Portland, but that wasn’t enough to stop the red-hot Trail Blazers.

Damian Lillard led the Blazers with 28 points and Portland won their ninth straight to consolidate their third place in the West ahead of New Orleans – who were beaten 116-97 by the Washington Wizards.

After Golden State’s Klay Thompson connected on a short jump shot to pull the Warriors within 92-91 early in the fourth quarter, Portland produced a 12-2 scoring run to push their lead to double-digits and the Warriors wouldn’t get the deficit below seven points the rest of the way.

The Warriors saw their seven-game win streak snapped and still await word on when Curry might return after “tweaking” his right ankle on Thursday. Their star point guard will definitely miss Sunday’s game at Minnesota.

The Cleveland Cavaliers also lost on the road, beaten 116-102 by the Clippers in Los Angeles.

LeBron James scored 25 points with 10 rebounds and six assists for Cleveland, whose lead over Washington and Indiana for third place in the East is now just half a game.

James also coughed up five turnovers to go with three blocks and two steals.

DeAndre Jordan was a dominant presence inside as he scored 20 points and pulled down 23 rebounds for the Clippers.

In Milwaukee, Khris Middleton led all scorers with 30 points and Giannis Antetokounmpo chipped in 28 points, 10 rebounds and a superb block of Emmanuel Mudiay’s layup in the third quarter as the Bucks beat the New York Knicks 120-112.

Milwaukee took charge of the contest with a 19-7 scoring run in the fourth quarter and kept themselves in playoff position in the East.