Knicks guard Immanuel Quickley reacts in the first half of...

Knicks guard Immanuel Quickley reacts in the first half of an NBA basketball game against the Houston Rockets at Madison Square Garden on Monday, March 27, 2023. Credit: Kathleen Malone-Van Dyke

The ball was passed ahead to Julius Randle with the clock ticking down to its final seconds in the third quarter and Randle, with the defense surrounding him, stepped back  and drained a three-point field goal, setting off a loud celebration at the Garden.

Randle headed to the bench, having upped the lead to double figures on the way to the Knicks’ 137-115 win over the lottery-bound Houston Rockets. Immanuel Quickley took a seat next to him on the bench, and for a night, all was good with the Knicks.

Not quite all good — not with Jalen Brunson in street clothes with a sprained right hand for a second straight game — but after three straight losses, the Knicks got back on the winning track and Randle ended his streak of games with a technical foul at three, not uttering a word to the officials as he finished with 26 points in 28 minutes.

It was Quickley who provided the biggest boost, stepping into the starting lineup in place of Brunson and scoring a career-high 40 points along with nine assists and only one turnover. Quickley was 14-for-18 from the field and 5-for-7 from three-point range, and he  finished his night with a pair of free throws to get his career best. His previous high came in a 55-minute, double-overtime effort in Boston last month; he needed just 30 minutes to achieve this one.

“Everybody has to pick it up when one of your best players is out, whether that be scoring, defense, leadership,” Quickley said. “You miss a lot of things when basically an All-Star is out. Everybody just has to be a little bit better, I think.”

The win pushed the Knicks to 43-33, good for fifth place in the Eastern Conference, 2 1⁄2 games ahead of the Nets and Miami, with the Heat next up at the Garden on Wednesday night.

Even with the 2 1⁄2-game edge and only six games left in the Knicks' season, the meeting with Miami is vital for the Knicks. If the Heat win on Wednesday, they will hold the tiebreaker if they can pull even with the Knicks by season’s end.

“Every game is a must-win at this point,” RJ Barrett said. “Everybody is fighting for something and it’s coming to the wire, so every game is even more important.”

Randle hit his first shot of the night — a three-point field goal — and by the end of the first quarter had piled up 15 points. And Quickley, with whom he had jawed last Thursday in Orlando, was right beside him, scoring 13 in the first quarter and 22 by halftime.

This turned into a game in which the Knicks did not need to rely on Randle. By the fourth quarter, there was no urgency, and he got to sit and watch as the reserves stretched the lead to as many as 33 points. And after four days of silence, he finally spoke before the game and insisted that while he is not any closer to perfect than anyone else is, he is back in a proper state of mind.

Last we saw, Randle was storming to the locker room at the end of the first half in Orlando on Thursday, having been assessed a technical foul for the third straight game and then arguing with Quickley as the guard tried to get hm away from referee Leon Wood.

“Honestly, I got away,” Randle said of the two days off between games and Sunday’s practice. “I got away and spent time with my youngest. Kyden’s not here, so I spent time with my youngest and my family and got to relax and yeah, get away for sure.”

Randle has regained his form this season after struggles last season on and off the court, saying earlier this season that in the offseason, he came to the realization that his body language was a problem. And his biggest issue last season was with the fans at the Garden, openly feuding with them as the MVP chants from a season earlier turned into boos.

This season he has been a different player and a different person — at least until the recent stretch of games. He said it is balancing the line between competitiveness and, well, whatever lies beyond that.

“Yeah, it’s a line,” Randle said. “It’s a line for sure . . . There’s a balance with everything. I’m obsessive about the game and love the game, very driven and focused, but there’s a balance, too.”

And when Monday’s game was over, Randle had only praise for Quickley.

“Quick was good, man,” Randle said. “Super-efficient tonight. Leading us to the win, obviously. Had it going, scoring. Career high. An overall good job just being a floor leader. Just amazing.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME