Luka Doncic posted a triple-double to lead Slovenia to their first Olympics berth in men's basketball as European nations claimed the final four spots in the Tokyo 2020 field.

Dallas Mavericks star Doncic had 31 points, 13 assists and 11 rebounds as Slovenia defeated hosts Lithuania 96-85 in Kaunas on Sunday.

In other qualifying tournament finals, Italy stunned Serbia 102-95, Germany defeated Brazil 75-64 and the Czech Republic downed Greece 97-72.

With those countries headed to Tokyo later this month, the field is now set.

Group A will consist of defending champions the United States, France, Iran and the Czech Republic, with Australia, Nigeria, Germany and Italy in Group B.

In Group C, hosts Japan will contend with Argentina, Spain and Slovenia.

Doncic and Slovenia face a difficult group, as Spain won the bronze medal at Rio 2016 after a close loss to the USA in the semi-finals, but the 22-year-old was ecstatic after qualifying.

"I don't care about the MVP," Doncic said. "We won here. We're going to the Olympics, the first time in our country.

"It's amazing. I think every kid dreams about being in the Olympics. I did too. So, here we are. We fought really, really hard, and I think we deserve to be here."

Italy's defeat of short-handed Serbia, who were missing NBA MVP Nikola Jokic, was the biggest upset of the final qualifying round.

Serbia were beaten finalists against Team USA in the Rio 2016 gold medal game, while Italy are in the Olympics for the first time since taking silver in Athens in 2004.