NBA

Shumpert’s career high helps Knicks hold off Spurs

SAN ANTONIO — Miracles do happen.

Carmelo Anthony made a grand return, but Iman Shumpert became the irreplaceable sidekick with the kind of monster night the Knicks have needed all season.

Shumpert tapped in Anthony’s missed corner 3-pointer for the go-ahead points with 23.4 seconds left to cap a brilliant evening with a career-high 27 points as the Knicks started the new year in style by shocking the Spurs, 105-101, at AT&T Center.

Anthony finished with 27 points, 12 rebounds and four assists after missing three games with a sprained left ankle. Though he petered out in the fourth quarter, he hit the game-sealing free throws with 7.2 seconds left.

But it was Shumpert who won the game with a giant 3-pointer, the tip-in and collecting a key loose ball. He outdueled Italian sharpshooter Marco Belinelli, who nearly beat the Knicks single-handedly with a season-high 32 points on 12-of-16 shooting.

Shumpert nailed 10-of-13 shots and made six-of-eight 3-pointers, all while defending Spurs point guard Tony Parker — with the Knicks uncomfortable using Beno Udrih.

“He saved us. He saved the day,” Anthony said. “Back to the old Shump we loved. If he plays like he did, we’re a tough team.”

The Knicks had blown all of a nine-point lead in the final five minutes. Tim Duncan put the Spurs up by two and the Knicks looked to be collapsing in full.

But Shumpert collected a loose ball after a scramble, got it back on a feed from J.R. Smith and fired in a left-wing trey with 39.1 seconds left, putting the Knicks up 101-98.

It has been a trying season for Shumpert, who has heard his name bandied in trade talks. But recently owner James Dolan told the team there will be no deals.

“They doubled Melo,” Shumpert said. “A lot of times I was just wide open. After the first one, I got rolling. I just felt good after my first two shots and after that guys started looking for me.

“It kind of [ticks] you off when you’re over and over in the gym shooting shots and nothing is falling in the game,’’ Shumpert said. “Defensively and rebounding, I’ve been fine. I just haven’t showed up in the points column. I knew sooner or later my shot would fall. I’ve been getting great looks, wide open shots. I just haven’t been knocking them down. I knew sooner or later I would. I spent enough time in the gym.”

The Spurs, who were three seconds away from their fifth NBA title last June, moved to 25-8 and got ripped by their star coach Gregg Popovich.

“We should be embarrassed about how soft we played tonight,’’ Popovich said. “I didn’t see the aggressiveness and passion the way I saw in the Knicks players. They wanted it more than we did.’’

The Knicks (10-21) began their Texas Triangle trip with their first win of the season against a Western Conference team.

“We played like we wanted the game for 48 minutes,’’ Anthony said.

Anthony tweaked his ankle with six seconds left, but said he likely would be all right to face Jeremy Lin and the Rockets on Friday in Houston.

“As of right now, yeah,’’ Anthony said of playing. “We’ll see [Friday] though.’’

Anthony scored just four points in the final quarter, and his left-corner 3-pointer with the score tied hit the iron. Shumpert bailed him out as he darted high to tip it in off glass.

“Everybody’s concentrating on Melo,” Shumpert said. “At times like that it’s going to take all five guys to keep an eye on him. As soon as I saw everyone turn their head, I made sure to run in there just in case he missed.”

The previous two games, both against Toronto, Shumpert was awful — likely hindered by a bruised thigh. After four days off, Shumpert looked spry and found his long-range shot.

“We need him to play like that all the time,’’ said Smith, who scored just four points, but hit two key buckets down the stretch. “We kept feeding the hot hand.’’

“Those were winning plays,” said coach Mike Woodson, who often has been critical of Shumpert. “I thought tonight we kind of came together as a group. This is kind of how we played last year. It didn’t matter who scored the ball. San Antonio will be right there when it counts, so it’s a nice win for our ballclub.”

Shumpert (7-of-9) had 16 points in the first half, draining a trio of 3-pointers, playing with the swagger of his rookie year. He hadn’t scored 16 points in a game all season.

Anthony sparked the club after a slow start when he missed three of his first four shots and committed an offensive foul. He hit eight of his next 10 shot attempts, as in rhythm as at any time this season. He carried 23 points into the fourth quarter. “He’s a tough guy,’’ Shumpert said.

Not affected by his recent sprained left ankle, he started posting up and hitting everything, making his final five shots of the half as the Knicks led 52-47 at halftime in a shocker. The Spurs had clobbered the Knicks by 41 points at the Garden on Nov. 10. Anthony said during his three-game absence he noticed some things about the club as a spectator and informed some players and coaching staff.