The Knicks' Landry Shamet and Karl-Anthony Towns on Friday against...

The Knicks' Landry Shamet and Karl-Anthony Towns on Friday against the Miami Heat at Madison Square Garden. Credit: Jim McIsaac

The Knicks began Friday night without Jalen Brunson, who watched the game from a back room as he nursed a right ankle sprain suffered Wednesday night. Midway through the first quarter, OG Anunoby limped off the floor and to the back, lost for at least the remainder of the game with a strained left hamstring.

Desperate times, desperate measures. Unpredictable outcomes.

The Knicks turned to Karl-Anthony Towns first and he responded, scoring 31 of his season-high 39 points in the first half. And when the Heat tried to clamp down on him, an assortment of heroes emerged.

Landry Shamet scored 30 of his career-high 36 points in the second half, which was even more unlikely than Towns’ scoring outburst — and the fans at Madison Square Garden chanting his name was evidence.

Shamet, meanwhile, was flexing and pumping up the crowd, all part of the Knicks’ unlikely 140-132 NBA Cup win with a cast of unlikely heroes.

“We have a system that bodes well for connectivity,” Shamet said. “The ball moves. It can be any one of us any night. I think we were just playing within our system. Sometimes shots find you. Play aggressive, it benefits everyone. It obviously helps when KAT has a massive quarter like he does. It’s a lot more opportunity for the rest of us to be aggressive when so much attention in the second half is gonna be on him. I think we were just playing off one another and it found me.”

Josh Hart (12 points, 10 rebounds, 10 assists) recorded his first triple-double of the season and 16th as a Knick, tying him for third on the franchise list with Richie Guerin and trailing only Walt Frazier (23) and Michael Ray Richardson (18). Jordan Clarkson had 24 points off the bench.

“We always preach it — next man up,” Hart said. “And games like this shows you we’re not just saying it. We actually mean it. We know everybody in this locker room is capable of having big nights, is capable of contributing. So when guys go out, obviously we don’t want that, but the next one’s ready to step up and hoop with the opportunity.”

Said Towns, “JB was missing the game today and we all had to step up and contribute to our team. So I wanted to do my best to pick up the offense that he gives our team, and in the first half, I did a good job of that. In the second half, I wasn’t trying to force it. I’ve had those days, so I was just letting the game come, and Landry Shamet is a big reason. He’s hitting shots, Josh is hitting shots.

“I don’t want to force trying to get 60 and lose the game. That’s the most important thing, to win the game, so I’m happy that experience has taught me a lot and I just didn’t force the game.”

Still, the concern again is an injury. Anunoby, who avoided injury last season for the most part, playing in 75 regular-season games and the entire postseason, was running the break with 6:52 left in the first quarter when he took a pass and went up for a layup. He seemed to injure the hamstring as he tried to take off, immediately grabbing it and heading to the bench after missing the shot. The Knicks immediately declared him out for the rest of the game.

The Knicks (8-4) began the game by misfiring on their first eight shots, falling behind 7-0 against a Heat team that also was shorthanded, missing Bam Adebayo and Tyler Herro, who has yet to play this season.

Towns got the Knicks started, hitting back-to-back three-point field goals. By the end of the first quarter, he was up to 18 points, and he kept piling on, draining three-pointers seemingly just after crossing midcourt.

Towns shot 11-for-16 in the first half, including 6-for-10 from beyond the arc, becoming the third player in the NBA to post at least 30 points in the first half this season (along with Nikola Jokic and Luka Doncic). The Knicks rode that production to a 78-68 lead, thanks to a 46-point second quarter.

The Heat sent multiple defenders at Towns in the second half, but Shamet scored 15 points in the third quarter and shot 6-for-9, including a pair of three-point field goals, a three-point play and a dunk at the rim over 7-footer Kel’el Ware on a cut along the baseline and feed from Towns.

Shamet kept it going in the fourth quarter, eliciting the chants from the crowd.

“He was special, and just like you guys bringing up my first half, it was his fourth quarter,” Towns said. “When he’s the hot hand, you’ve gotta get him the ball, and he provided a spark for our team and gave us that comfort level where we just felt we needed to get stops and get the ball flowing through our offense, and if it ended up in Landry’s hands, we felt good about our chances. Shout-out to Landry Shamet. He was special.”

“There’s no way I can tell you that some of these guys are going to score the ball the way they did, or Josh was going to get a triple-double,” coach Mike Brown said. “A lot of things I couldn’t tell you.

“I just know that we all know how to play the right way. We have a standard that we’re all bought into, that we’ve all embraced, and we have a way that we play offensively and defensively. When we stay within that, good things will happen most times.”

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME