Enes Kanter was stunned that he got into the game in the third quarter Wednesday. But that’s how desperate Knicks coach David Fizdale was as the NBA’s worst team played the part to perfection in a 114-90 rout at the hands of the Mavericks.

But there was a feel-good moment. After four straight games in which he did not play, Kanter bounded off the bench, went to his knees and kissed the midcourt Garden logo upon entering the game. He explained later it could be a farewell kiss in potentially his final game in a Knicks uniform as he seeks a trade after being banished from the rotation.

“They know the love of New York I have in my heart,’’ Kanter said. “I have no problem with this organization. From Day 1, I loved this city, this organization, the fans. They opened their arms.’’

For the second straight home game, the fans chanted Kanter’s name — and this time Fizdale caved.

“It was kissing the logo — I love this team,’’ Kanter said. “I was planning this for a long time. I was waiting to get back in. Who knows how much longer I will play here? I was able to show the fans some love for one last time — I have no idea.’’

After a series of dunks by Mavs center DeAndre Jordan in the third quarter, chants of “We want Kanter’’ filled the Garden. Fizdale, who said beforehand he was sticking to his guns, yelled out, “Enes.’’ Kanter hopped off the bench to cheers and came in with 5:24 left in the third.

“He yelled out my name and I was like, ‘Really?’ ’’ Kanter said. “I had to look around. ‘Is he serious?’ I got up and fans started to clap and I was like, ‘This is really happening.’”

Kanter was cheered when he touched the ball on his first possession. But there are no fairy tales in Knicks-land, and Kanter shot an airball over Jordan on his second possession. Later, Luka Doncic shot a 3-pointer over Kanter to make it a 20-point Mavericks lead to end the third.

“I was definitely nervous,’’ said Kanter, who played nine minutes and scored five points. “I airballed that first shot. I was like, ‘Man I got to get into game shape.’ ”

Before the game, Fizdale, responding to Kanter’s remark that the coach was not doing right by the fans in benching him, said he couldn’t worry about it, he had to do his job. Afterward, Fizdale said his big men “weren’t playing at the level they should be playing at.’’

Kanter seems to just want this to end.

“I hate the business side of this game,’’ he said. “On the court and off the court I have been having a rough time.’’

The loss was another sign of the Knicks’ regression since November, when they won in Dallas.

Dirk Nowitzki, in possibly his final game at the Garden, got even more love from the crowd than Kanter, who considers the German superstar his “idol.’’

Nowitzki drew the night’s loudest cheers in the Knicks’ 12th straight home loss.

Just by stepping away from the bench to bounce to the scorer’s table, Nowitzki received a warm hand. Then he got a standing ovation when he checked in with 2:33 left in the first quarter, sank his first 3-point attempt to more cheers and finished the half with nine points on 3-of-4 shooting.

The Mavericks didn’t even need Doncic, the probable rookie of the year, to dominate. He scored his first Garden basket on a fallaway over Tim Hardaway Jr. and finished with 16 points on 7-of-18 shooting with five assists in 28 minutes.

Dennis Smith Jr., whom the Knicks passed on to draft Frank Ntilikina, posted a triple-double, with 13 points, 10 rebounds and 15 assists.