Richarlison continued his fine form at the Olympics with a double as Brazil eased into the quarter-finals after a 3-1 win over Saudi Arabia on Wednesday, as Germany exited the men's tournament and hosts Japan progressed with a thrashing of France.
Richarlison fires Brazil into Olympics quarter-finals, Germany out
Daizen Maeda (C) scored Japan's fourth goal as France were humbled in the Olympic football
Reigning champions Brazil, who won gold for the first time on home soil in Rio de Janeiro five years ago, finished top of Group D and will face Egypt in the last eight on Saturday.
Matheus Cunha put them ahead in Saitama on Wednesday, but Abdulelah Al-Amri's goal brought the Saudis level before the half-hour mark.
A draw would have been enough for Brazil to go through as group winners, but Richarlison netted in the 76th minute and again in injury time.
The Everton forward is now the leading scorer in the tournament with five goals after his hat-trick against Germany.
The Germans, runners-up to Brazil in 2016, bowed out after a 1-1 draw with the Ivory Coast.
Germany had to win to progress, but Benjamin Henrichs' own goal midway through the second half proved costly.
Eduard Lowen's equaliser shortly afterwards set up a tense finale, but the Ivorians held on to seal second spot in the group and a quarter-final against Spain.
The Spaniards are one of the gold medal favourites after naming a strong squad featuring six members of the team that reached the Euro 2020 semi-finals.
But they scored only twice in the group stage, with a 1-1 draw against Argentina enough to edge them through.
Real Sociedad midfielder Mikel Merino put Spain in front in the 66th minute. Tomas Belmonte netted a late equaliser for Argentina but the point sealed 1992 champions Spain first place in Group C.
Egypt set up a dream clash with Brazil by seeing off Australia 2-0 with goals from Ahmed Yasser Rayan and Ammar Hamdy.
France had given themselves hope of progressing from Group A when Andre-Pierre Gignac scored a hat-trick in a 4-3 win over South Africa.
But they crashed out as their defence proved fragile again in a 4-0 loss to Japan.
The home side, who reached the semi-finals in London in 2012, made it three wins from three and booked a match against New Zealand.
Real Madrid youngster Takefusa Kubo netted for the third straight match before former Marseille defender Hiroki Sakai's tap-in doubled the lead.
Substitutes Koji Miyoshi and Daizen Maeda added to France's blushes as youngster Randal Kolo Muani was sent off on a miserable evening for Les Bleus.
South Africa's slim hopes of reaching the quarters were ended by a 3-0 loss to Mexico in a game which ended with both teams a man down.
The Mexicans will take on South Korea on Saturday, in the same half of the draw as Brazil and Egypt.
South Korea finished top of Group B after a 6-0 thrashing of 10-man Honduras and were joined in the knock-out stage by the Kiwis, who played out a goalless draw with Romania to finish above their opponents on goal difference.
JOIN OUR PULSE COMMUNITY!
Eyewitness? Submit your stories now via social or: