Knicks forward Michael Beasley is defended under the basket by...

Knicks forward Michael Beasley is defended under the basket by Magic guard Jamel Artis at Madison Square Garden on Sunday, Dec. 3, 2017. Credit: Kathleen Malone-Van Dyke

The Knicks already were going to be without Kristaps Porzingis when word came that Tim Hardaway Jr. couldn’t play because of a leg injury. Things didn’t get much better for them after that.

Moments after the Knicks lost to the Orlando Magic, 105-100, on Sunday at Madison Square Garden, the team announced that Hardaway has a stress injury in his lower left leg. It’s serious enough that he didn’t travel with the Knicks to Indiana for Monday night’s game against the Pacers. Porzingis also didn’t travel.

The Hardaway injury came out of the blue. Knicks coach Jeff Hornacek expected him to play but got word shortly before the game that he couldn’t. He will undergo more tests, and the Knicks should have an update Monday.

“Tim was definitely a surprise to all of us, I think even to himself,” Michael Beasley said. “But that [injury] bug is going around and it’s hitting hard.”

Hornacek said the pain is in Hardaway’s shin and doesn’t think it’s related to the left foot issue that affected him earlier this season. Hornacek said Hardaway has had “lingering soreness” the past couple of days. He was checked out before the game and then pulled by the doctors.

Hornacek doesn’t want to think about the Knicks being without Hardaway for long. “We certainly hope not,” he said. “But we’ll continue to evaluate him and we’ll find out.”

Jarrett Jack said, “We didn’t know anything about it until literally five minutes before tip-off. We didn’t even know he had an injury or a lingering issue at all. It’s tough, man. For him to have to miss some time, it’s tough. We’re going to rally around him and collectively try to fill that void.”

It hardly was a surprise that the Knicks didn’t have Porzingis, who suffered an ugly-looking right ankle injury Wednesday and also is ill. He has said he won’t return until his ankle is 100 percent. The Knicks have listed Porzingis as day-to-day, but Beasley said he knew for a couple of days that he would start this game in his place.

If the Knicks (11-11) are without their two top scorers for extended time, it will be difficult for them to stay afloat, especially given that they’ll be on the road for much of December and January.

“I’m just going to pray for Tim, pray for KP,” Enes Kanter said. “I think they’re going to be fine. Guys need to just step up more and play with more effort and energy.”

The Knicks fell behind by 17 in the first quarter, went ahead in the third quarter but didn’t get enough stops, particularly down the stretch, to earn the victory.

“I think we just played soft,” Kanter said. “I don’t want to say nothing else, whatever. I don’t want to blame nobody. It starts with me. I think we just played real soft. We cannot just let teams come in here and beat us like that.”

Beasley scored 21 points. Kanter had 18 points and 16 rebounds, but his man, Nikola Vucevic, had 34 points and 12 rebounds to lead Orlando (10-14).

Vucevic scored 12 points in the fourth quarter, including the game-icing free throws with 3.6 seconds left. Evan Fournier scored 20 points and made four foul shots in the last 23.7 seconds.

After Courtney Lee (19 points) tied the score at 85 on a layup with 5:59 left, Orlando scored 10 consecutive points. The closest the Knicks got after that was 99-96 on Jack’s three-pointer with 28 seconds left.

“When you lose those two important pieces, I think we need to step up more,” Kanter said. “We cannot make more mistakes. We need to make less mistakes and play with more energy and more effort out there.”

DON'T MISS THIS LIMITED-TIME OFFER1 5 months for only $1Save on Unlimited Digital Access