Kristaps Porzingis of the Knicks reacts after a dunk in...

Kristaps Porzingis of the Knicks reacts after a dunk in the second half against the Grizzlies with teammates Enes Kanter and Courtney Lee t Madison Square Garden on Wednesday, Dec. 6, 2017. Credit: Jim McIsaac

Kristaps Porzingis declared himself 100 percent healthy before the start of the game, and then went out and proved his right ankle was more than fine.

Porzingis logged 34 minutes one week after his ankle turned 90 degrees, and he put the finishing touches on his triumphant return in the final minute when ran on the baseline and exploded to the basket to catch and throw down an Enes Kanter lob.

With Porzingis back from a two-game absence, the Knicks snapped a two-game losing skid and beat the Memphis Grizzlies, 99-88, Wednesday night at Madison Square Garden.

Porzingis was a little rusty — he shot 8-for-19 — but he scored 18 points and grabbed five rebounds. Porzingis scored seven of the Knicks’ last 11 points when they pulled away.

“I usually recover pretty quickly from things,” Porzingis said. “I had the goal to come back for this game and we made it possible. It’s good to be 22.”

The Knicks weren’t whole, and they won’t be for at least another two weeks. That’s when Tim Hardaway Jr’s stress injury in his left leg will be re-evaluated. But getting Porzingis back helped the Knicks (12-12) climb back to .500.

It also helped that they were playing a reeling Grizzlies’ team that has already fired its coach and lost for the 12th time in 13 games. Memphis (8-16) actually led by 12 in the first quarter, but the Knicks grabbed control with a 30-4 run over the second and third quarters.

Porzingis made his presence felt but other Knicks stepped up, which is what they’re going to need without Hardaway.

Courtney Lee, who moved back to his more natural shooting guard spot, led the Knicks with 24 points. Lee shot 10-for-17 overall and was 4-for-6 on three-pointers and was a spark in the run on both ends of the floor.

Lee buried a three at the end of the first half to tie the score and that momentum carried over to the third quarter when the Knicks started on a 19-2 run. Jeff Hornacek said he wants Lee to look for his shot more with Hardaway out.

“I’m just being aggressive,” Lee said. “Tim was shooting like 18, 20 shots a game. So I need to warm this arm up and get ready. If I’m going to shoot that many times on top of my shots that’s like 30 shots.

“If he wants me to do that I’ll just go out there and be aggressive. I’m not going to force nothing.”

Jarrett Jack did a solid job orchestrating the offense. The veteran point guard finished with 10 points, 10 assists and six rebounds. Michael Beasley scored 14 off the bench, and Kanter ended up with 12 points and 12 boards.

Marc Gasol led Memphis with 17.

When Porzingis initially suffered the injury, it looked like he would miss extended time. Heat forward Justise Winslow stepped on Porzingis’ right ankle and it turned in a gruesome fashion. He spent the past several days getting treatment three times a day. the Knicks were fortunate he didn’t sustain any structural damage and was able to return so quickly.

“You never know coming off an ankle twist like he had when you first start running on it, how it’s going to affect him,” Hornacek said. “Are you not going to have the spring you had before? But he looked good. So I was happy to see it.”

The Knicks were up 86-71 with under eight minutes left, but they let Memphis back in the game. The Knicks went 1-for-5 with two turnovers over their next seven possessions and the Grizzlies closed to within 88-82 with 4:48 left.

Lee came through for the Knicks. He scored on a floater to start a 7-0 run. After a defensive stop, Porzingis hit a turnaround jumper to give the Knicks a 10-point cushion with 3:24 to go. A Porzingis’ three extended the Knicks’ lead to 95-82 with 2:01 left.

“We got stops,” Lee said. “We’ve just got to get our defensive identity back and just attack on the defensive end. Then that takes care of everything.

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