Kristaps Porzingis of the Knicks grabs his ankle after an...

Kristaps Porzingis of the Knicks grabs his ankle after an injury in the first half against the Heat at Madison Square Garden on Wednesday, Nov. 29, 2017. Credit: Jim McIsaac

The Madison Square Garden crowd fell silent as Kristaps Porzingis was lying on the floor, and then it gasped and moaned after he had to be helped off the court.

All the good feelings about the Knicks’ unexpected start to the season followed Porzingis into the locker room after he awkwardly rolled his right ankle less than three minutes into their 115-86 victory over the Heat.

Porzingis and the Knicks seem to have avoided a potentially devastating outcome after Justise Winslow stepped on his ankle. The injury was ugly and certainly appeared to be severe. But the Knicks said Porzingis sprained his ankle and that X-rays were negative and he was available to return. He never did.

“I knew it was bad because I felt my ankle touching the floor,” Porzingis said. “But I didn’t overreact to that.

“I knew it wasn’t broken. I’ve had fractures and things like that before. I know what that feels like. I knew bones were fine. It was just like a tendon situation. A sprained ankle. I think it looked worse than it felt.’’

Porzingis said he wanted to come back. He was warming up and riding the stationary bike. But he said the doctors “recommended” that his night was over. The Knicks (11-10) were up 20 at the time and well on their way to their most lopsided win of the season and ending a three-game losing streak.

The Knicks’ next game is Sunday, so Porzingis hopes that after a few days of rest and treatment he’ll be able to play.

“They call me the lizard because I recover so quickly from things,” Porzingis said. “So hopefully it’s nothing too big and I’m going to get treatment, and hopefully the lizard will be ready for Sunday.”

Enes Kanter said, “He’s a strong unicorn.”

It was a fairly good sign that after the game he wasn’t in a walking boot or on crutches, but he did leave the locker room with a noticeable limp. Porzingis said there’s no further testing scheduled, but he could undergo an MRI if it worsens overnight.

“I don’t think it’s that serious, but we’ll see how I feel tomorrow,” he said. “Tomorrow is the day when we really know if we should make some further stuff to see what’s going on.”

Porzingis was chasing a loose ball into the corner when Winslow stepped on his ankle, which turned all the way to the right. He slapped the floor as he tried to get up.

“I knew it snapped bad,” Porzingis said. “I felt it right in that moment.”

Jarrett Jack ran to Porzingis and immediately waved for a trainer. Porzingis, who ranks fourth in the NBA with a 27- point average, made his first two shots before exiting with 9:30 left in the first quarter.

“It didn’t look pretty,” Jeff Hornacek said. “But he’s a tough kid. He wanted to come back in the game. But for the good of the long term it was probably not a good thing to do. He’ll get treatment and hopefully he’ll be back the next game.”

Porzingis has become the Knicks’ most important player, and has flourished in his new role as their go-to guy. The Knicks have struggled without Porzingis — losing both games he’s missed — and hope they don’t have to be without him for an extended period. But they got a key player back Wednesday, and he made a major difference.

Kanter returned after missing the prior three games with back spasms and gave the Knicks the boost they had been missing. The Knicks lost all three by an average of 13 points.

Kanter had a double-double by halftime, and finished with 22 points and 14 rebounds in less than three quarters.

“I was just so hype, man,” Kanter said. “I didn’t play three games. I was like so excited and just like so hungry, I just wanted to go out there and bite somebody’s ear off.”

Courtney Lee scored 17 points. Tim Hardaway Jr. and Doug McDermott each had 12 for the Knicks, who shot 44-for-73 (60.3 percent). Willy Hernangomez had eight points and grabbed eight rebounds in nine-fourth-quarter minutes. Rookie Frank Ntilikina didn’t play because a sprained left ankle.

Kelly Olynyk led Miami (10-11) with 18 points.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME