Cote d’Ivoire and Egypt have been eliminated in the quarter-finals of the men’s football event at the Tokyo Games.
Cote d’Ivoire lost 5-2 to Spain after extra-time while defending champions Brazil edged Egypt to progress to the semi-finals.
Spain, the last European side to win a men’s soccer gold in 1992, survived a scare against Ivory Coast after Rafa Mir came off the bench to fire a stunning hat-trick in the closing stages at Miyagi Stadium.
Winger Max Gradel appeared to have secured Ivory Coast’s place in the final four when he made it 2-1 with a stoppage time strike, only for Mir to score almost immediately at the other end to force extra time.
Ivory Coast’s fate was sealed when defender Eric Bailly, who scored their opening goal inside 10 minutes, turned from hero to villain as he conceded a penalty with a bizarre handball inside the box.
Mikel Oyarzabal slotted the ball home from the spot in the 98th minute before Mir added two more goals past an exhausted Ivory Coast defence to put the result beyond doubt.
Victory ensured Spain’s first appearance in the semi-finals since claiming silver at the 2000 Sydney Games.
Brazil never hit top gear but did enough to beat Egypt 1-0, thanks to a first-half strike from youngster Matheus Cunha.
Up next for Brazil are 2012 gold medallists Mexico, who put on an attacking masterclass in a 6-3 rout of South Korea in Yokohama.