DALLAS (AP) — The Dallas Mavericks are going Euro with their rebuild, the same way they did 20 years ago with Dirk Nowitzki.

Dallas moved up two spots in the NBA draft Thursday night to get Slovenian guard Luka Doncic, who was selected by Atlanta at No. 3 while the Mavericks picked former Oklahoma scoring sensation Trae Young for the Hawks at No. 5 as part of the deal. The Mavericks are also sending a protected first-round pick to Atlanta.

The Mavericks are coming off consecutive losing seasons for the first time in nearly 20 years, back when Nowitzki ended up being the centerpiece of a rebuilding project that led to 12 straight trips to the playoffs and the franchise’s only championship in 2011.

The big German is the highest-scoring foreign-born player in NBA history and one of seven overall with at least 30,000 points. The Mavericks acquired Nowitzki during the 1998 draft, trading down to get the 7-footer who was taken ninth overall by Milwaukee.

The 19-year-old Doncic will be his teammate, with Nowitzki expected to become the first player in league history to spend all 21 seasons with the same franchise.

“He’s a great leader, a great person,” Doncic said of the 2007 MVP and 2011 NBA Finals MVP. “I’m just really happy to be part of his career. I just want to learn so much about him.”

Doncic arrived in New York on Wednesday after helping Spain’s Real Madrid win its league championship after he won Euroleague MVP and Final Four MVP honors when they won that title this year. His lengthy European season kept him from working out for teams but he knew the Mavericks were interested.

“I’ve been talking to Dallas a lot,” Doncic said. “They were very nice to me, and I think we had a very good relationship.”

At 6-foot-7 and 220 pounds, Doncic averaged about 15 points, five rebounds and five assists during Real Madrid’s championship season. As with Nowitzki 20 years ago, the question is how his game will translate to the NBA.

“This kid has won everything there is to win in European and international basketball and he’s done it at an age that’s unprecedented,” coach Rick Carlisle said. “I’m not sure what position he is. I think his position is on the floor, making plays and making people better.”

Doncic signed with Real Madrid at age 13 and made his debut as a 16-year-old. He teamed with Miami’s Goran Dragic to lead Slovenia to a surprising gold medal at FIBA EuroBasket 2017. His father, Sasa Doncic, played professionally for 15 years.

The Mavericks made the move for Doncic a year after drafting point guard Dennis Smith Jr. with the ninth overall pick, giving Dallas a chance to have one of the NBA’s youngest backcourts depending on where Doncic lands in the rotation. Carlisle said he sees Doncic as a starter.

“He’s the kind of player that is going to be able to play with virtually anybody,” Carlisle said. “He just has the skill set and an understanding and a feel for the game. He’s a great shooter, so he creates space for other players, which is really going to help Dennis.”

President of basketball operations Donnie Nelson played a big role in Nowitzki coming to Dallas, and remembers a rough first couple of seasons for the 13-time All-Star. So he’s taking a guarded approach with Doncic for now.

“Luka is his own guy,” Nelson said. “He’s got his own challenges. It’s not going to be quick. He’s got a very unique skill set. Anyone who can make his teammates better, shoot the long ball, get to the paint, he’s going to be a pretty darn good asset for the Mavericks for years to come.”

The Mavericks took another guard with the 33rd overall pick in the second round, getting Jalen Brunson, who won two NCAA titles in his three years at Villanova. The reigning Associated Press player of the year averaged 18.9 points and 4.6 assists in his final season.

Dallas swapped picks late in the second round with Philadelphia and got Dayton’s Kostas Antetokounmpo, the younger brother of Milwaukee Bucks star Giannis Antetokounmpo. He was the 60th and final pick of the draft.

The 76ers got former SMU guard Shake Milton, who was the 55th choice. Dallas also got Ray Spalding of Louisville at No. 56, another pick originally belonging to Philadelphia.