CLEVELAND — The Knicks were without Carmelo Anthony. The Cavaliers had LeBron James and were at full strength for the first time this season. But instead of waving a white flag, the Knicks almost pulled off a near-Christmas miracle.

They fought the deeper, more talented Cavaliers until the bitter end, but they couldn’t make plays down the stretch, and James and the Cavaliers did. Cleveland ended the game on an 11-2 run and held off a gritty Knicks team, 91-84, Wednesday night at Quicken Loans Arena.

“That’s a tough one,” Derek Fisher said. “We had our chances. We made some mistakes and not just down the stretch but in the first half, and that caught up with us.”

Playing without Anthony, who sat out because of a sprained right ankle, the Knicks had trouble scoring with the game on the line. They led 82-80 with 4:07 remaining but faded after that, scoring only two points the rest of the way.

Their next five possessions resulted in three misses and two turnovers. The Knicks (14-16) didn’t score again until Arron Afflalo hit inside with 36.8 seconds left to bring the Knicks within 88-84. They were 6-for-24 (25 percent) with three turnovers and scored 12 points in the fourth quarter.

“No excuses,” Fisher said. “We still had our opportunities. We have to accept that and really be a no-excuse team. But the things that happened out there, whether Carmelo’s playing or not, you can’t do those things against the best teams in the league and expect to win.”

advertisement | advertise on newsday

Unlike Monday night’s game, when Fisher left Kristaps Porzingis on the bench in crunch time for defensive purposes, the rookie was on the floor in the fourth. But the Knicks didn’t look for him enough.

Porzingis finished with 23 points and 13 rebounds, but he didn’t score in the fourth quarter and didn’t take a shot until he heaved a desperation three-pointer just before the final buzzer. He was 8-for-18, including 4-for-5 from three-point range.

“I’ve got to be more aggressive at the end maybe,” Porzingis said.

“I don’t think Kris had a lot of opportunities down the stretch,” Fisher said. “Some of that is us. Some of that is how they defended us.”

Afflalo scored 16 and Jose Calderon had 10. Lance Thomas, who started in place of Anthony, had eight points.

Knicks videos

James scored 24, including six of Cleveland’s last 11. He also had nine rebounds and five assists. Kevin Love added 23 points and 13 rebounds and Tristan Thompson had 10 points and 14 boards.

Anthony went through the morning shootaround, but when he tested his sprained right ankle at the hotel in the afternoon, he had trouble pushing off and moving laterally. He didn’t want to risk further injury, but he believes he will be able to play Saturday night in Atlanta.

“Usually I would try to play through these [minor] injuries,” Anthony said. “But I didn’t want to take a chance of it lingering.”

The Cavaliers led by 11 in the first quarter and looked poised to run away from the undermanned Knicks, but they tied the score at 68 with 3:37 left in the third quarter. They took their first lead, 74-72, on Lou Amundson’s putback 47 seconds into the fourth.

After Cleveland went up 77-74 on James’ layup with 8:01 left, Afflalo scored six consecutive points for the Knicks and gave them an 80-79 lead with a driving layup with 5:28 left. It stayed that way until Love’s free throw with 4:31 to play tied it again.

advertisement | advertise on newsday

Langston Galloway nailed a jump shot to put the Knicks back on top 82-80, but Thompson scored inside to tie it and the Knicks wilted from there.

After a timeout, Thomas threw the ball away, leading to James’ basket in transition. After Thomas’ miss, James was fouled going to the basket and hit both free throws to make it 86-82. Afflalo then turned it over and James threw down a big dunk to give Cleveland a six-point lead with 51.9 seconds left.

“We were fighting hard the whole game,” Porzingis said. “We have heart. We fell a little short at the end.”