Spain,Brazil,Japan,Mexico advance to Olympic semifinals in men's soccer.
Brazil's men moved within two wins of back-to-back Olympic golds by beating Egypt 1-0 at Tokyo 2020.
A first-half strike from Matheus Cunha put the defending champions through to the semi-finals, where they will face Mexico on Tuesday.
Japan will meet Spain in the other last-four match.
The hosts beat New Zealand 4-2 on penalties after a 0-0 draw, while Spain came from the brink of elimination to beat Ivory Coast 5-2 after extra time.
When Max Gradel put Ivory Coast 2-1 ahead in the first minute of added time at the end of the 90 minutes, they looked to be heading into the semi-finals.
But Wolves striker Rafa Mir equalised with his first touch off the bench, then scored twice in extra time as Spain stretched away to reach the last four for the first time in 21 years.
While that game produced seven goals, Mexico's match against South Korea featured nine - the former winning 6-3 to set up a semi-final with Japan.
The hosts are are now one win away from securing a first medal in men's football since claiming bronze at the 1968 Games.