Slovenia won its first European basketball championship on Sunday, defeating Serbia 93-85 in Istanbul behind 35 points by Goran Dragic.

Dragic, the Miami Heat guard who was voted MVP of the tournament after the game, watched the final four minutes from the bench due to cramp. He had been visibly tiring, missing all three shots and the one free throw he took in the final quarter.

With Dragic out, Serbia briefly took the lead at 79-78, and again at 82-80 with 3:37 to go. But Slovenia, which had upset pre-tournament favourite Spain 92-72 in the semifinals, refused to fold. It went on a 12-0 run, during which guard Klemen Prepelic scored the go-ahead basket, 84-82, with 2:20 to go.

After a balanced first quarter, which ended with Serbia 22-20 ahead, Dragic scored 20 of Slovenia's 36 points in the second quarter to help give it a 56-47 halftime lead.

"We gave them a lot of transition points. They brought the NBA speed on the floor," Serbia coach Aleksandar Djordjevic said.

"We are an uptempo team ... the importance of the game shouldn't change what we do," said Slovenia's Serb coach, Igor Kokoskov.

Djordjevic responded by taking out his 2.21-meter (7-foot-3) centre Boban Marjanovic of the Detroit Pistons in favour of more mobile players, who managed to slow down the pace in the third quarter at the 16,000-seat Sinan Erdem arena. Dragic still managed to score nine points and Slovenia stayed ahead, 71-67, but lost young star Luka Doncic with a sprained ankle.

Bogdan Bogdanovic, who is set to join the Sacramento Kings next season, led Serbia with 22 points.

Kokoskov, also the assistant coach for the Utah Jazz, gave a nod to his boss — coach Quin Snyder.

"He is my dear friend, my boss. He told me 'Be prepared for the press conference and say something deep and smart.' Well, I can't say anything."

Dragic may be a nine-year NBA veteran but Kokoskov, the first European to be a full-time assistant coach in the league, has spent 17 seasons there, after a brief stint at college level. He and Dragic worked together at the Phoenix Suns for four seasons (2008-11 and 2012-13)

Earlier, Spain defeated Russia 93-85 to take third place, with 51 points coming from the Gasol brothers, Pau (26) and Marc (25). Alexey Shved led Russia with 18.