Knicks guard Josh Hart drives to the basket as Miami Heat...

Knicks guard Josh Hart drives to the basket as Miami Heat forward Jaime Jaquez Jr., left, defends during the first half of an NBA game Monday in Miami. Credit: AP/Lynne Sladky

MIAMI — Shortly before game time, the Knicks retreated to the locker room to prepare and Jalen Brunson stepped onto the court, going through a routine of shooting drills despite being ruled out for a second straight game after suffering a sprained right ankle.

The encouraging sign gave hope that perhaps Brunson would be ready to rescue the Knicks by Wednesday when they travel to Dallas to take on the Mavericks.

But on this night, they still needed to find a way to make up for his absence on offense and OG Anunoby’s much longer absence on defense.

In the end, it was the sort of situation that would have cried for Brunson.

All of the offensive explosions that carried the Knicks to a win over Miami just three days ago were absent as they fell, 115-113, to the Heat at Kaseya Center.

The loss provided a heartbreaking start to the five-game road trip and left the Knicks still winless on the road this season at 0-4.

“I don’t think we’re going to go 0-41 on the road,” Josh Hart said. “At some point it’ll bounce in our favor. We just got make sure we’re fully locked in whenever we’re on the road.

“We’ve got to make sure we’re communicating at high level, that we know the scout, know personnel and we know how to execute.”

Karl-Anthony Towns had scored 31 first-half points Friday, but this time he was just 1-for-8 in the first half, finishing with 22 points. Landry Shamet provided the second-half fireworks Friday with 30 of his career-high 36 points in the second half. But this time he was 2-for-10 for just 10 points. Deuce McBride led the Knicks with 25 points, but came up empty twice in the final 20 seconds.

The Knicks made one last run after falling behind by as many as 10 with three minutes left, closing the gap to one with 22.4 seconds remaining. With the deficit at 114-110, Shamet misfired on a pull-up three-point attempt, but Hart fought for an offensive rebound and kicked out to Towns for an open three that he finally delivered on after missing all six of his attempts beyond the arc to that point.

Davion Mitchell, a 58% free-throw shooter, got the inbounds pass after a Miami timeout and the Knicks fouled him immediately, sending him to the line with 21.4 seconds left. He misfired on the first before draining the second, giving Miami a 115-113 lead.

McBride missed a tough attempt, but Towns grabbed the rebound and put up a shot that was blocked by Kel’el Ware. Originally called a goaltending violation, it was reviewed and ruled a clean block, creating a jump ball at center court. The Knicks got the ball and McBride missed a runner, but Towns got the rebound again and got two chances, the second shot bouncing out with 2.6 seconds left and the loose ball bounced out of their grasp at time expired.

“Two of the three [refs] called goaltending,” Towns said. “I was under the assumption it was goaltending. When I saw them go to the table I saw [referee] Ray [Acosta] tell them it’s goaltending, so I thought it was just looking at a clock situation, where the clock should stop, whatever the case may be. We were also under the impression, we got the rebound, so we had possession, so both ways we should be getting the ball back.

“When we heard it wasn’t goaltending or it was possession, it was a jump ball, we were kind of confused. At the end of the day though, we still found a way to win the tip, got a good look.

“Some days, I thought I shot a good one. I thought it was good. When I was on the floor I was in my mind already that they’re going to call timeout and advance the ball. I didn’t realize it didn’t go in. I thought it went in until I saw everyone jumping.”

McBride, who was a question mark until Monday morning, dealing with a personal issue, provided the spark — on offense and with a play that got the entire Knicks bench out of their seats. With the Knicks clinging to a one-point lead with 7:44 to play split two defenders on a break and rose, slamming in a one-handed dunk.

But that shot would not put the Heat away. After a timeout the Heat mounted a 14-2 run to take control of the game. The Knicks were unable to score late in the game and that was really little different from the rest of the game.

Notes & quotes: Erik Spoelstra, who coached Brunson in the World Cup, spoke before the game about the Knicks star in the wake of Spoelstra’s home burning down last week. “I’ve mentioned it to him and I’ve mentioned it to other people — I really dislike myself, I can’t look at myself in the mirror, how much I grew to like him. He texted me the other day, he has such a great heart, just to check in on me and the family. I told him my two sons are Jalen Brunson fans but I told them it’s not allowed in my house.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME