Slovenia finished on top of Group C, following its 87-95 victory over Spain on Sunday.
The Slovenians stunned the Spaniards with a wild come-back in the fourth quarter to secure the win and the top place in the group.
After a hard-fought battle in the first half (44-41), Spain went on an 11-2 run to take a double-digit lead early in the third quarter (55-43).
Yet, Slovenia turned things around quickly (70-68) and outscored its opponents 17-27 in the final part of the game to seal the deal.
Slovenia remained undefeated in the competition (3-0) and will now face either Italy, Germany or Argentina.
On the other hand, Spain (2-1) will battle France, Team USA or Australia.