Canada dumped defending champions Spain out of the Basketball World Cup in the second round on Sunday, while Italy, Serbia and tournament sensations Latvia also advanced to the quarter-finals.
The United States suffered their first loss of the tournament at the hands of Lithuania, but both teams had already qualified along with Germany and Slovenia.
The US will play Italy in the last eight, while Lithuania will face Serbia, Germany take on Latvia and Slovenia play Canada.
The US and Canada also qualified for the Paris Olympics as the two highest-placed teams from the Americas, with Puerto Rico, the Dominican Republic and Brazil all bowing out.
Spain and Canada went perfect through the group stage with three wins, but both were on the end of shock defeats when the second round got underway.
That set them up for a winner-takes-all head-to-head clash in Jakarta, and it was Canada who were left standing after a dramatic 88-85 win.
Shai Gilgeous-Alexander, who finished as the game’s top scorer with 30 points, said “our group wanted it a little bit more”.
“We knew what was at stake and we were willing to do whatever it took, and we ended up getting it done,” he said.
Spain were 10 points in front at half-time and increased their lead by two at the end of the third quarter, but Canada came storming back.
Thirteen of Gilgeous-Alexander’s points came in the decisive fourth quarter, and team-mate Dillon Brooks helped out with 22 overall.
Canada head coach Jordi Fernandez said his players were “the definition of a winning team”.
“We didn’t come here just to go to the Olympics,” he said.
“We want to make sure that everyone knows that we’re knocking at the door and that we’re thirsty for more.”
Latvia are making their World Cup debut and have already beaten Spain and Tokyo Olympics silver medallists France at the tournament.
Italy beat Puerto Rico 73-57 to reach the quarter-finals for the first time since 1998.
Serbia beat the Dominican Republic 112-79 to advance, getting back on track after a surprise loss to Italy in their previous game.
Germany beat Slovenia 100-71 in a game between two teams who had already qualified for the quarter-finals.
In games on Sunday between teams who had already been eliminated, Australia beat Georgia 100-84 and Montenegro beat Greece 73-69.