Already-qualified title favourites Brazil and Japan were joined by hosts Great Britain, surprise qualifiers Egypt, Mexico, Senegal, South Korea and Honduras in the quarter-finals of the Olympic soccer tournament on Wednesday.
Great Britain beat Uruguay 1-0 in Cardiff to make it through to the last eight for the first time since 1956 and will meet South Korea in the last eight in the Welsh capital when all four games are played on Saturday.
Brazil will play Honduras at St James' Park in Newcastle, Japan, who qualified after their second match, will face Egypt at Old Trafford, Manchester and Mexico will meet Senegal at Wembley.
Egypt, who endured a torrid start to the competition when they trailed 3-0 to Brazil in their opener, completed a remarkable recovery by reaching the quarter-finals with a 3-1 win over Belarus.
Brazil completed their perfect run of three straight wins when they beat New Zealand 3-0 at St James' Park, Newcastle to seal first place in Group C ahead of Egypt.
Four matches played in the afternoon produced only one goal when Mexico beat Switzerland 1-0 in Cardiff to win Group B.
The other games between South Korea and Gabon in Group B and Japan and Honduras and Spain and Morocco in Group D finished goalless with only South Korea and Japan advancing.
Spain, among the favourites before the tournament started, went out without scoring a goal, the only team not to score.
There was huge and unexpected passion in Cardiff where the hosts Great Britain, back in the Olympics for the first time since 1960, overcame Uruguay with a goal on the stroke of half-time from Daniel Sturridge.
Fears that the Welsh crowd would boo the national anthem never materialised and they were screaming and cheering for the British team with all the passion reserved for Wales matches by the end of a thrilling clash.
Egypt, bedraggled and bewildered against Brazil at the start, finished that match narrow 3-2 losers and, inspired by that fightback, finished the group phase in some style by leapfrogging Belarus into second place.
Egypt coach Hany Ramzy faced the prospect of losing Mohamed Aboutrika and Emad Meteab from his squad as were due to return to their club Al Ahly before Saturday's match.
But late on Wednesday the club announced to Egyptian media the players would be allowed to stay with the squad.
Belarus just needed a draw to qualify but Egypt hit them with second-half goals by Mohamed Salah, substitute Marwan Mohsen and Aboutrika, whose third in the 78th minute sealed victory. Andrei Voronkov scored a late consolation for Belarus four minutes from time.
Brazil had their match against New Zealand wrapped up in the first 30 minutes. Danilo and Leandro Damiao netted the first two and midfielder Sandro added a third six minutes into the second half.
But defender Alex Sandro will miss the quarter-final after being sent off for a second bookable offence 15 minutes from time.