HOUSTON — On the last leg of their most important road trip in four years, a journey that took them roughly 7,000 miles in 10 days, the Nuggets appeared as if they had finally run out of steam.

Then they found a way to keep fighting for their playoff lives. Denver just didn’t have enough to overcome yet another late charge by James Harden.

Houston’s MVP candidate scored 15 of his 31 points in the fourth quarter and hit a dagger 3-pointer with less than a minute left, thwarting a huge Nuggets rally and handing them a 110-104 loss that served as blow to their postseason hopes.

“We fought them tooth-and-nail all the way to the end and came up a little bit short,” Nuggets coach Michael Malone said. “My message to our guys was, ‘Don’t drop your head. Feel really good about the effort we put forth tonight. We have basketball left. We’re still alive. There’s only two teams left fighting for that playoff spot.”

The Nuggets (37-41) dropped one game, plus the tiebreaker, behind idle Portland in the race for the eighth and final playoff spot in the Western Conference. With just four games remaining for both teams, the Nuggets are staring at long odds. A path to postseason would likely have to include Denver winning its remaining games, beginning with Friday’s home game against New Orleans.

The Nuggets rallied from a 17-point first-half deficit, briefly took a lead in the third quarter and trailed by just one point with less than four minutes remaining in the game. Denver could just never find the big shot to get over the top in the final five minutes.

The Nuggets finished 7-of-38 from 3-point range and shot 39.4 percent overall.

“We competed and played hard. We just didn’t make enough plays,” guard Jameer Nelson said. “They made some timely shots and timely plays. They got a couple calls that kind of hurt.”

Harden, the league’s leader in free-throw attempts, went 11-of-15 from the line, part of Houston’s 38 free-throw attempts. The Nuggets had 18 attempts, hitting 15.

“I’m not going to say too much on that,” Malone said. “They are masters at drawing the fouls. Hopefully at some point the league will clean it up where some people are kind of exploiting the system right now in getting to the line. But James is a great player, and all their guys do a good job of that.”

Jokic had a putback that cut Houston’s lead to 103-101. But Harden, who hit the game-winning shot during Denver’s last game in Houston on March 20, came up with the big shot on the next possession to give the Rockets enough cushion to hang on and clinch the No. 3 seed in the West.

The Nuggets trailed 50-33 midway through the second quarter, lost in a sea of dynamic pick-and-roll offense from Houston that ended in one lob dunk or kick-out 3-pointer after another. And one night after nearly breaking the scoreboard in an absurd 134-131 win over New Orleans, the Nuggets couldn’t find the net.

Then came the fight. The Nuggets clamped down defensively. They held the Rockets, who shot 68.4 percent in the first quarter, to just 38 percent (19-of-50) over the next two quarters. The Nuggets, playing their third game in four nights, limited Houston to 42.5 percent shooting.

The Nuggets turned the tide, but the end result of a 2-3 road trip still puts the them up against the wall.

“We’ve been a good team the last one and half months and we play together,” said Jokic, who finished with 12 points, 19 rebounds and nine assists. “We’re going to continue to do that. We’re going to keep fighting in every game and we’ll see what happens.”