Knicks guard RJ Barrett and forward Julius Randle slap five...

Knicks guard RJ Barrett and forward Julius Randle slap five in the second half of an NBA game against the Heat at Madison Square Garden on Thursday. Credit: Kathleen Malone-Van Dyke

In the weeks leading up to Thursday’s naming of the NBA All-Star reserves, every question to Knicks coach Tom Thibodeau about the case to be made for Julius Randle and Jalen Brunson would be answered, but with an addendum. Thibodeau would add a third name to the list of Knicks who deserved consideration.

RJ Barrett.

But on a night when Randle was named an Eastern Conference All-Star reserve and Brunson was absent with a non-COVID illness and snubbed by the coaches voting for the bench players, Barrett drew attention for something completely different — being left on the bench for the final 11:51 of action two nights earlier and continuing his no-show by refusing to speak after the game.

On this night, it was oddest that it was Barrett who came up big for the Knicks when they needed him most. He finished with 30 points — 20 in the second half — eight rebounds and four assists as the Knicks held off the Heat, 106-104, at Madison Square Garden.

The Knicks went ahead by five points with 5.2 seconds left — and could have lost at the buzzer when Tyler Herro attempted a three-pointer from the left corner. It went off the rim.

The Knicks (28-25) moved within one game of Miami for the sixth spot in the Eastern Conference standings.

Randle had 23 points, 10 rebounds and six assists. He scored 19 points in the first half, picking up some of the slack with Brunson sidelined. Quentin Grimes added 17 points.

Bam Adebayo had 32 points and Herro added 25 for the Heat.

Randle fired a pass to Grimes for a three-pointer and a 100-95 lead with 1:50 remaining.

Herro hit a short jumper and Adebayo committed a goaltending violation on Barrett’s driving layup, giving the Knicks a 102-97 lead with 1:23 to play.

When Barrett attempted to float an inbounds pass to Randle, Adebayo reached over him, stole it and headed downcourt on a fast break, drawing a foul on Randle and hitting two free throws to cut the Heat’s deficit to 102-101 with 52.8 seconds left.

Barrett, running the offense from the top, found Grimes, who quickly fed Isaiah Hartenstein cutting along the baseline for a dunk with 33.5 seconds left.

Adebayo then stole another Barrett pass, but this time Hartenstein stole Herro’s pass. The Knicks swung it around, avoiding Miami’s efforts to foul, and Grimes hit a cutting Randle for an uncontested dunk with 5.2 seconds left, putting the Knicks up five and seemingly in control.

Max Strus hit a three-pointer with 2.1 seconds left and the Knicks called their final timeout, up two. As he tried to catch a lobbed inbounds pass near midcourt, Randle stumbled and fell backward, losing the ball to Adebayo. A foul originally was called on Adebayo, but replays clearly showed there was no contact. A coach’s challenge was ruled successful, giving Miami the ball.

Herro got the ball in the left corner and got off a clean look for a potential game-winning three-pointer as Randle and Barrett raced toward him, but it bounded off the rim as time expired.

Thibodeau dismissed the benching of Barrett against the Lakers as simply a case of going with the group that was playing well. On Thursday, he said there was no need to talk to Barrett about the situation.

“No, just come in and get ready the next day,” Thibodeau said. “We know he’s a critical part of our team. We need him to play well. But we’re always going to put the team first and we thought the group that was out there gave us the best shot. Most of the times he’s finishing the game, so just get out there and play. I don’t worry about missed shots as much as just help in any way you can.”

On snubbing the media after his stint on the bench, Barrett said, “I’m human. I get frustrated like everybody. My momma told me if you don’t have anything good to say, don’t say anything at all.”

And Thursday night? “Be aggressive. Play my game,’’ he said. “Feel like I didn’t really play my game, haven’t had that aggression start to finish in a while. We really — media won’t see things that go on, but we worked together tonight. Credit to the whole team.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME