The Mavericks and the New York Knicks have consummated a six-player trade that sends center Tyson Chandler back to Dallas.

The Mavericks, who immediately made reacquiring Chandler one of their priorities after their first-round playoff exit against San Antonio, completed a trade with the Knicks that was clinched by agreeing to take back the contract of New York's out-of-favor guard Raymond Felton as well.

The trade cost Dallas two starters -- point guard Jose Calderon and center Samuel Dalembert -- along with prized young point guard Shane Larkin, reserve guard Wayne Ellington and the 34th and 51st picks in Thursday's draft.

The Knicks have agreed to trade Tyson Chandler (left) and Raymond Felton to the Mavericks. Nathaniel S. Butler/NBAE/Getty Images

The deal was first reported by ESPN.com's Marc Stein.

Chandler is the player Dallas has missed most since it decided to let go several key contributors in free agency after the team's championship run in 2011.

Chandler, 31, wound up landing a four-year, $60 million deal in free agency with the Knicks that year, a deal that has one season remaining.

The departures of Chandler and Felton are believed to be just the start of a roster overhaul by new Knicks president Phil Jackson, with Jackson pursing as much salary-cap flexibility as he can in the hopes of convincing star free-agent-to-be Carmelo Anthony to stay.

"The journey to build this team for the upcoming season and beyond continues," Jackson said in the announcement. "We have added players with this move that will fit right in to our system while maintaining future flexibility.

"We would like to thank Raymond and Tyson for their time and hard work with the organization over the past few years."

If the Knicks keep all players acquired in the deal they will have saved $3 million in cap space for this summer but forfeited $5.2 million in cap space in the summer of 2015, when they are expected to chase big-name free agents. The Knicks are currently over the salary cap and will only be able to use trade exceptions to lure free agents this summer.

The Mavericks will have approximately $26.5 million in salary cap space before re-signing Dirk Nowitzki to a hometown discount deal. A source told ESPNDallas.com that the Mavs' front office is optimistic that the addition of Chandler significantly increases the team's odds of successfully recruiting LeBron James or Carmelo Anthony, two superstars available in free agency.

"It makes us real players for LeBron and Carmelo," the source said, adding that pairing one of the perennial All-Star small forwards with Nowitzki and Chandler could give Dallas the NBA's premier frontcourt.

With Chandler entering the final season of his contract, the Mavs then also would be positioned to make a run next summer at another premier free agent, such as Kevin Love, Marc Gasol or Dallas native LaMarcus Aldridge.

"We think Tyson makes our defense better and we still maintain quite a bit of cap flexibility," Mavs owner Mark Cuban told ESPNDallas.com via email.

Chandler was the emotional catalyst for the Nowitzki-led Mavericks when they beat the Miami Heat in six games to win the franchise's first title in 2011.

Cuban made the much-debated decision not to offer him a long-term contract because of concerns over how the new labor deal would keep Dallas from making other moves. Chandler, who had a history of injuries, turned down a one-year deal worth about $20 million for the security of the four-year contract with the Knicks.

Chandler is going into the final season of that deal at $14.5 million, and Felton has one year at $3.8 million with a player option for another season in the same range.

Calderon just finished the first season of a four-year, $28 million contract with the Mavericks, who also signed Monta Ellis to a multiyear deal last summer. It was the first time Dallas had committed to any player beyond one year since Nowitzki signed his most recent extension in 2010.

Nowitzki will join Anthony in free agency, but he is expected to re-sign with the Mavericks.

The Knicks are getting one of the best 3-pointer shooters and a steady hand at the point in Calderon, but he sometimes sat late in close games because he was a defensive liability. He averaged 11.4 points and shot 45 percent from 3-point range last season.

Felton is coming off a trouble-plagued season that included his arrest in February in a felony gun possession case. He was expected to plead guilty in exchange for community service and a $5,000 fine.

Felton, who turns 30 on Thursday, averaged a career-low 9.7 points and saw a significant drop in his shooting percentage last season.

Dalembert had an up-and-down season in the first year of a two-year deal with Dallas, while Larkin and Ellington were used sparingly.

Larkin, the son of Hall of Fame shortstop Barry Larkin and a first-round pick a year ago, saw his playing time drop dramatically when Devin Harris returned from toe surgery at midseason.

Harris is a free agent and wants to return to Dallas, but he would like the three-year contract he and the Mavericks agreed to last year before the toe injury scuttled the deal. He settled for a one-year contract.

Information from ESPN.com's Marc Stein, ESPNDallas.com's Tim MacMahon, ESPNNewYork.com's Ian Begley and The Associated Press was used in this report.