(AP) — The Dallas Mavericks are going Euro with their rebuild again, 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 lottery-protected first-round pick in 2019 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.

Nowitzki, who was in the draft room with the Mavericks two nights after celebrating his 40th birthday, quickly greeted his fellow European on Twitter, and Doncic replied in kind.

”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.”

The Mavericks took another guard with the 33rd overall pick in the second round, getting Jalen Brunson from two-time NCAA champion Villanova. Dallas also had the 54th overall pick in the second round.

The Hawks’ decision to acquire Young likely means veteran guard Dennis Schroder’s future with the team could be short-lived.

This is not the first time the Hawks have quickly traded the No. 3 overall pick. In 2001, the Hawks made Pau Gasol the No. 3 overall pick and then traded his draft rights to the Memphis Grizzlies for Shareef Abdur-Rahim.