NBA

Dennis Smith got the breakout game he desperately needed

This was billed as a revenge game.

Dennis Smith Jr. may not have been the headliner, but the Knicks point guard turned in his best effort of the season anyway in his first crack at his old team.

With Frank Ntilikina battling foul trouble much of the night, Smith took advantage of the minutes and chipped in 13 points, eight assists and six rebounds in a 106-103 win over the Mavericks on Thursday night at the Garden.

Ntilikina played the role of closer, coming up with the clutch defense to make sure the Knicks held on, but Smith made his mark in a season-high 30 minutes.

“Game ball,” coach David Fizdale said. “I was so proud of him. He’s been through more than any of us can imagine.”

When the teams played last week — for the first time since the Kristaps Porzingis trade, with Smith part of the package coming back to New York — Smith had just returned to the Knicks after being away 11 days to mourn the death of his stepmother and did not play. But he returned to form in time for the rematch and looked more like the player the Knicks hoped they were acquiring last January.

“Just grateful,” Smith said after shooting 5-for-12 from the field and 2-of-4 from deep. “Glad to be playing. Glad to be out here with these guys. Glad to have people that believe in me. Just a lot of gratitude.”

Smith had three points (on 1-of-14 shooting, 0-for-4 from deep) in his first four games of the season entering Thursday, with seven inactives in between. The work he had put in during the summer reworking his shot had yet to pay dividends, but the rewards began coming to fruition Thursday. He drained one of his 3s with a step-back move over Luka Doncic, his old teammate.

“He was the MVP of the game,” Julius Randle said. “That’s the Dennis we need every game.”

After setting up Mitchell Robinson for a pair of alley-oops in the first half — the second one set up by a fake pass — Smith made his presence known again in the third quarter when he came flying through the paint to slam home a missed 3 by RJ Barrett for the 72-67 advantage.

“What I’ve learned in my life at least, is when you go through real adversity, like losing a loved one, it gives you real perspective,” Fizdale said. “You stop putting so much pressure on a game. … He really let the game come to him. He had a really solid basketball game.”

For more on the Knicks, listen to the latest episode of the “Big Apple Buckets” podcast: