Slovenia overcame a big early deficit to beat Croatia 89-80 and claim the final World Championship place still up for grabs at EuroBasket 2005.
The Slovenians, who went unbeaten in the group stage but fell apart against Dirk Nowitzki and Germany in their quarter-final, will now try to play Lithuania in a battle for fifth place on Sunday afternoon.
Their main mission is accomplished already, according to Slovenian captain Rasho Nesterovic.
"This is a huge accomplishment for us," said Nesterovic. "We are a country of two million people. If anybody had given this (World Championship qualification) before the tournament, we would have taken it."
And of course, the Slovenian players knew who they had to thank the most - their fans. A reported 10,000 of them made the six hour drive from the neighbouring country to attend their games over the weekend.
Guard Sani Becirovic said the players were well aware of the support they were getting.
"The fans were our sixth and seventh man," Becirovic said. "We have to thank them for coming out in such big numbers and helping us in some difficult times."
Jaka Lakovic led six players in double figures for Slovenia with 20 points, while Nesterovic put his nighmare quarter-final behind him with 10 points and 10 rebounds.
Ales Pipan's side fell behind in the first quarter as the Croats played as if they didn't need Zoran Planinic and Mario Kasun, both out because of injuries suffered in the game against Spain.
Croatia scored from both inside and out in the early stages through Dalibor Bagaric, Vjucic and Gordan Giricek.
But Slovenia got back into the game thanks to a strong second quarter as they outscored Croatia 21-16 to cut the deficit to three points at half-time.
Guard Aleksandar Capin led the scoring burst by connecting on three of four attempts from beyond the arc in the second period alone.
Giricek was not in Croatia's starting five in the second half as Croatia went with a backcourt of emerging stars Roko-Leni Ukic and Marko Tomas.
That decision may have backfired on coach Neven Spahija, though, as Croatia ended up making only one field goal and scoring only eight points in the period.
For Slovenia, Capin continued where he left off in the first half, hitting a three-pointer with eight minutes left in the third quarter as Slovenia closed to within two at 45-43.
Climamio Bologna star Erazem Lorbek also hit from beyond the arc to give Slovenia their first lead of the second half, 46-45 before extending it to 48-45 the next trip down the court with a lay up.
The game swung in Slovenia's favour and Nesterovic made a turnaround jumper to cap a 7-0 run that gave Slovenia a 50-45 advantage.
Giricek tried to lead Croatia back. He buried two free throws to end the run and close the gap to 50-47, but again Nesterovic made a hook shot and Capin converted a tough lay up on a fastbreak to restore the seven-point advantage at 54-47.
The Croats struggled to make a shot for much of the second half, and even went more than seven minutes without a field goal as Slovenia held them to eight third quarter points, six of them coming from the free-throw line.
Bostjan Nachbar made a three-pointer to give Slovenia their first double digit lead of the game of 67-55 with 5:39 to play, but Marko Popovich made a lay up and converted the free-throw to cut it back to nine.
Slovenia were cruising, but after Bagaric dunked on back to back possessions to cut the lead to 81-74 with a minute left to play.
Croatia got within four as Ukic made a three-pointer with 43 seconds left to bring Croatia within four, 81-77.
Spajiha's men fouled Lakovic and he pushed the lead back to six.
Croatia still had 38 seconds to go but substitute Damir Rancic rushed a three-pointer and Slovenia grabbed the rebound.
Becirovic converted two foul shots to put Slovenia on their way.
Giricek and Bagaric each had 13 points for Croatia, while Tomas chipped in with 12 and both Popovic and Vujcic finished with 10.
For Croatia, this was a tough way to follow a heartbreaking loss to Spain in overtime in their quarter-final on Friday.
But it was a game that head coach Neven Spahija knew was going to be hard to play because of the controversy surrounding the quarter-final game against Spain.
"Already yesterday I said that we don't have a good chance to win this game, I thought our chances are less than 1%," Croatia's coach declared. "Before the game I saw my players in the locker room and knew we have no chance to win this game."