Team president Steve Mills said the Knicks feel like they did the right thing by trading former first-rounder Kristaps Porzingis. “You don’t want to commit a max [contract] to a player who clearly says to you he doesn’t want to be here,” Mills said.

“The city deserves better than that…. My suggestion for Knicks fans is to STAY WOKE!! Peace,” Porzingis wrote on his verified account early Sunday morning.

Knicks president Steve Mills said that Porzingis, a restricted free agent this summer, informed him that he “no longer wanted to be a part of our group” during a Thursday morning meeting. The meeting lasted less than five minutes, league sources told ESPN.

There has been a strong disconnect between Porzingis and Knicks management in recent years, and it culminated in Thursday’s meeting. Porzingis expressed concerns on the state of the franchise and his future with the organization in the meeting, sources told ESPN’s Adrian Wojnarowski.

Knicks GM Scott Perry said the Knicks were aware of Porzingis’ displeasure with the direction of the franchise in recent weeks.

Mills cited Porzingis’ time spent at the team facility — which had decreased recently — as one sign of his disconnect from the franchise.

“When you try to think about how you want to build your team for the long term, you don’t want to commit a max [contract] to a player who clearly says to you he doesn’t want to be here,” Mills said Thursday. “That would be a disservice for our organization and disservice to our fans.”

Mills noted that both parties seemed to be on the same page at the beginning of the season after New York elected not to extend Porzingis’ rookie contract, before Porzingis began showing signs of a disconnect.

New York began to speak to teams about different trade scenarios involving Porzingis in the days leading up to Thursday.

“When the meeting occurred this morning, we’d already been having many conversations with a number of teams,” Perry said Thursday. “So we decided to act upon one.”

In doing its due diligence, New York contacted the New Orleans Pelicans about an Anthony Davis trade in recent days. There was uncertainty about Porzingis’ desire to play with the Pelicans long term, sources said.

At the time of their trade of Porzingis, the Knicks had several offers for the 23-year-old big man, league sources told ESPN.

But multiple teams interested in making an offer for Porzingis said that they were unable to do so before New York traded Porzingis to Dallas, league sources said.

The Knicks were looking for salary-cap relief and young players or future first-round picks in a trade. So while the Knicks could have fielded more offers for Porzingis — possibly increasing their return in the process — the transaction with Dallas seemingly accomplished their objectives.

By clearing their books of the money owed to Tim Hardaway Jr. and Courtney Lee — who were both moved to Dallas in the Porzingis trade — ESPN’s Bobby Marks projects the Knicks to have a league-high $71 million in salary-cap space this summer. That’s enough cap space to attempt to sign two maximum-salary free agents.

Some close to Durant see New York as a possible landing spot for the back-to-back NBA Finals MVP if he chooses to leave the Golden State Warriors, according to league sources.

In addition to Smith, the Knicks will get the Mavericks’ unprotected first-round pick two years after they send one to the Atlanta Hawks to complete their draft-day deal for Luka Doncic and another protected first-round pick two years after that, sources said.

Those picks could come as soon as 2021 and 2023 if Dallas does not move into the top five this year.

The Mavs deemed Porzingis’ potential to be worth the price, considering him a franchise-caliber player whose game complements 19-year-old rookie star Doncic.

Dallas is hoping to re-sign the 7-foot-3 Porzingis to a long-term deal this summer, and it is confident that Doncic and veteran Dirk Nowitzki — a player Porzingis grew up idolizing — can play significant roles in making that happen, a source told ESPN’s Tim MacMahon.

Porzingis, the No. 4 overall pick in the 2015 NBA draft, was averaging a career-best 22.7 points per game before he suffered a torn ACL in his left knee during a breakout All-Star season in 2017-18. He also was averaging 6.6 rebounds and 2.4 blocks per game.

Porzingis will probably not play for the Mavericks this season as he continues to recover from the injury, owner Mark Cuban told ESPN’s Tim MacMahon.

Porzingis was evaluated in January by the Knicks’ medical staff, which confirmed his knee is healing well. He recently worked out with a coach on the court for roughly 45 minutes, during which he was shooting pull-up 3-pointers and dunking.

Porzingis will have an introductory news conference in Dallas on Monday.