All-Star Nikola Jokic was ejected in the third quarter as strongly fancied Serbia were stunned 81-69 by Spain to blow the Basketball World Cup wide open on Sunday.
Led by Ricky Rubio of the Phoenix Suns, Spain set up a quarter-final meeting with surprise packages Poland on Tuesday while Serbia will need to pick themselves up quickly for Argentina on the same evening.
Spain and European rivals Serbia had already qualified for the last eight in China but Group J supremacy and a supposedly easier game in the next round was at stake.
Serbia, the reigning world and Olympic silver medallists, behind the Americans, had looked imperious in their previous four matches.
But in one of the most eagerly anticipated games of the tournament so far, Spain surged back from a slow start in the first quarter to lead by eight points at half-time in Wuhan.
Serbia, who had looked the chief threat to the young roster of reigning champions the US, were rattled for the first time in China.
Midway through the third quarter, their chances of making a comeback suffered a fatal blow when Denver Nuggets' Jokic -- one of the World Cup's biggest names -- was turfed out of the game after rowing with the referee.
The 24-year-old was irritated initially by the close attentions of Spain's defence.
Bogdan Bogdanovic of the Sacramento Kings was again key for Serbia, keeping them within range of Spain with 26 points, 10 rebounds and six assists.
Rubio racked up 19 points for the Spanish while veteran centre Marc Gasol had six rebounds and six assists.
Argentina topped Group I -- and teed up a meeting with Serbia -- after a dominant 91-65 victory over Poland. Both had already reached the last eight.