Stephen A. Smith is excited at the possibilities for the New York Knicks after they finalize the Kristaps Porzingis trade to the Dallas Mavericks. (1:22)

The Dallas Mavericks have acquired All-Star forward Kristaps Porzingis and three other players from the New York Knicks in exchange for a package that includes point guard Dennis Smith Jr. and two future first-round picks.

Wesley Matthews and DeAndre Jordan, who both have expiring contracts and could be buyout candidates, will also go to the Knicks. Trey Burke, who is averaging 11.8 points per game this season, is headed to the Mavericks along with Porzingis, Courtney Lee and Tim Hardaway Jr.

The deal came after Porzingis met with Knicks management Thursday and left franchise officials with the impression that he wanted to be traded, sources told ESPN's Adrian Wojnarowski.

The meeting lasted less than five minutes, league sources told ESPN's Ian Begley. New York had several offers for Porzingis before completing the deal with Dallas, sources said.

The Knicks did call New Orleans about Anthony Davis, a source told ESPN's Ramona Shelburne, but the Pelicans weren't interested in the Latvian. There was uncertainty over Porzingis' willingness to remain in New Orleans beyond his current contract, sources told ESPN.

Knicks general manager Scott Perry acknowledged that the club had many conversations with a number of teams about potential trades prior to meeting with Porzingis.

"We started to get a feel, we could see that he wasn't completely buying into what we were trying to do," Knicks president Steve Mills said during a post-trade conference call. "And again, [during Thursday's meeting] we wanted a confirmation from him whether he was completely in or out. He made it clear to us when he came in to meet with us that he no longer wanted to be part of our group.

"... With the uncertainty of [his] status and coming off the injury as well, it made Feb. 7 [the trade deadline] a very important date for us. We felt that in the best interests of the organization, and the Knicks fan base too, that we had to make a move here. We feel very good about that move."

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 first-round pick that is protected two years after that, sources told Begley and Wojnarowski. Those picks could come as soon as 2021 and 2023 if Dallas does not move into the top five this year.

The Mavericks are hoping to re-sign the 7-foot-3 Porzingis, who will be a restricted free agent, to a long-term deal this summer, and they are confident that Doncic and veteran Dirk Nowitzki can play significant roles in making that happen, a source told ESPN.

"He loves Luka and Dirk," a source told ESPN about Porzingis, whose other option would be to sacrifice millions by playing on a one-year qualifying offer.

Porzingis spent time with Doncic in Madrid last summer while he rehabbed his ACL injury at the Real Madrid facility, sources said.

"We obviously think Porzingis is a great young talent, similar in many ways to Dirk," coach Rick Carlisle said on the Mavs' flagship station 103.3 FM ESPN. "This is kind of a Dirk-and-[Steve] Nash type of situation, only these guys are taller."

Porzingis took to Twitter after the trade to post a few emoji to go with a video of him and Doncic from Wednesday night's Mavs-Knicks game at Madison Square Garden.

Late Thursday, Porzingis again tweeted to say: "New York will always have a special place in my heart. Grateful for everybody who made this journey so special for my family and I."

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

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 left knee injury during a breakout All-Star season in 2017-18. He also was averaging 6.6 rebounds and 2.4 blocks per game.

Hardaway, 26, was leading the Knicks with 19.1 points per game this season, but New York wanted to move him because he is due $18.2 million next season and has a player option for $19 million in 2020-21.

Lee, 33, is due $12.8 million next season. He has played sparingly this season due to the Knicks' youth movement but averaged 12.0 points per game as a starter last season.

"There are other good players in the deal," Carlisle said. "Hardaway Jr. is a terrific shooter and a proven 2 guard in this league. Courtney Lee has been a guy that's been out of the rotation in New York, because they've been going young and all that kind of stuff, but he's a guy that can still play the game well. He's a good defender and shoots the ball well. And Trey Burke's resurrected his career."

play 2:02 Woj breaks down impact of Porzingis trade Adrian Wojnarowski joins SportsCenter to dissect the Knicks trading Kristaps Porzingis to the Mavericks.

By clearing their books of those contracts, ESPN's Bobby Marks projects the Knicks to have a league-high $71 million in salary cap space this summer -- enough to attempt to sign two maximum-salary free agents.

New York will target the top players on the market, which is expected to include Kevin Durant, Kawhi Leonard and Kyrie Irving.

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.

The Knicks (10-40) have struggled without the 23-year-old Porzingis, who has been sidelined for nearly a year because of his ACL injury. He was evaluated in January by the team's medical staff, which confirmed his knee is healing well.

He recently worked out with a coach on the court for roughly 45 minutes. The workout included Porzingis shooting pull-up 3-pointers and dunking.

Smith returned to the Mavericks lineup on Jan. 23 after a two-week absence while trade rumors swirled. While the team chalked up the six games missed to back soreness and an illness, Carlisle later acknowledged that "business stuff" was behind the absence.

Sources told ESPN that Smith, a 2017 lottery pick who is averaging 12.9 points and 4.3 assists per game this season, had taken issue with some of Carlisle's tough coaching tactics and that the 21-year-old wasn't pleased with his role playing primarily off the ball due to Doncic's emergence as an All-Star-caliber playmaker.

"Dennis Smith has had a really terrific year and a half in terms of growth," Carlisle said Thursday. "I mean, he tops it off last night with a triple-double [against the Knicks]. He's a tremendous young player, and New York is such an exciting environment for a guy like him. It'll be a great situation for him."

Some in the Knicks' front office were enamored with Smith ahead of the 2017 NBA draft, sources said. The Knicks instead selected Frank Ntilikina with the No. 8 pick. Ntilikina's name has come up in recent trade discussions, including informal talks between New York and Dallas about the possibility of moving Porzingis, sources told ESPN.

Mills said Thursday that he is looking forward to Smith and Ntilikina complementing one another.

"He's very explosive. And we think the guy has a chance to be a really, really good basketball player in this league," Perry said. "So we're excited about handing him over to coach [David] Fizdale and his staff and letting him really work with him in the development and round out his game."

New York will continue to try to trade disgruntled center Enes Kanter ahead of the Feb. 7 trade deadline, sources told ESPN.

The 6-11 Jordan, an 11-year veteran, averaged 11.0 points and 13.7 rebounds per game for the Mavericks this season. The former Olympian and top defensive center was an All-Star selection in 2017, was named to the All-NBA team in 2016 and has twice been named to the All-NBA Defensive first team.

Matthews averaged 13.1 points in 44 starts for the Mavericks this season, his 10th in the league.

The Mavs waived rookie second-round pick Ray Spalding to create the roster spot necessary to make the trade.

ESPN's Zach Lowe and Marc Spears contributed to this report.