Luka Doncic led Dallas to the NBA Finals last season. Anthony Davis won a championship with the Los Angeles Lakers.

They now have switched teams in an absolute blockbuster.

Doncic was traded by the reigning Western Conference champion Mavericks to the Los Angeles Lakers for Davis as part of a three-way deal. The trade was announced Sunday morning after the teams got the required league approval.

The trade talks, which took place over about a month, were kept extremely tight-lipped by Mavericks general manager Nico Harrison and Lakers GM Rob Pelinka. Among those not in the know until the end of the process: Mavs coach Jason Kidd.

His first reaction? “Shock,” Kidd said, though he later added that he believes it’s the right move for his team going forward.

Maxi Kleber and Markieff Morris also headed to the Lakers, while Max Christie went to Dallas. The Utah Jazz also were involved, getting Jalen Hood-Schifino and a 2025 second-rounder from both the Mavs and Lakers.

“Sports are about transformative moments,” Pelinka said. “We are inspired by these moments Lakers fans know, expect and love with a franchise that continually ushers in new eras of greatness. ... Luka is a one-of-a-kind, young global superstar who will lead this franchise for years to come. His killer instincts and commitment to winning championships will be a driving force for the team.”

The trade news broke shortly after the Lakers beat the Knicks at Madison Square Garden. Davis was not with the Lakers for the game; he has been in Los Angeles because of an abdominal injury that needed assessing.

Doncic has not played for Dallas since Christmas, when he exited a game with a strained left calf. The trade may come at a serious price for Doncic, who now can’t sign a five-year supermax contract extension this summer that could have been worth around $345 million.

It was never clear if the Mavs would have offered such a massive deal. Doncic also would have had an option to leave as a free agent after the 2025-26 season, and it’s certain that other teams with hopes of landing the Slovenian star would have planned for such scenarios.

“There’s other teams that were loading up,” Harrison said Sunday. “He was going to be able to make his own decision at some point of whether he wants to be here or not, whether we want to supermax him or not, or whether he wants to opt out. We had to take all that into consideration and I feel like we got out in front of what could have been a tumultuous summer.”

Doncic is still eligible for an extension this summer, with the max that the Lakers could offer him being five years at about $230 million — a $115 million difference than what the supermax could have been.

The deal pairs Doncic with LeBron James as the new 1-2 punch in Los Angeles, while Davis would be forming a new star duo with Kyrie Irving in Dallas. And it reunites Doncic with his former teammate, Lakers coach JJ Redick.

Doncic was one of the Mavericks players on the floor when Redick came out of a game for the final time on May 11, 2021.

For the Mavericks, the decision largely came down to what Davis does on the defensive end of the floor.

“We think defense wins championships and we’re bringing in one of the best two-way players in the league,” Harrison said. He added that Davis’ ability to be elite at both ends makes him “a unique unicorn” in the NBA.

“We feel like we’re built to win now as well as in the future,” Harrison said.