Spain reached the final of the men’s Olympic football competition with a 2-1 comeback victory over Morocco.
The 2020 silver medallists fell behind in the first half of the semi-final after tournament top scorer Soufiane Rahimi converted a penalty for his sixth goal at the Games.
Barcelona’s Fermin Lopez equalised midway through the second half in Marseille after pouncing on a loose ball in the penalty area.
Substitute Juanlu Sanchez then drilled home a winner five minutes from time to clinch his side’s place in Friday’s final in Paris.
They will play the winners of the second semi-final between France and Egypt (20:00 BST).
Meanwhile, Morocco will face the losers of that tie in the bronze medal match in Nantes on Thursday.