Lyon: Jean-Philippe Mateta scored twice as hosts France came from behind to beat Egypt 3-1 after extra time on Monday and set up an Olympic men's football final showdown with Spain, who edged Morocco 2-1.
Thierry Henry's France looked to be heading for defeat in their semi-final in Lyon after Mahmoud Saber put Egypt ahead against the run of play just after the hour mark.
But Crystal Palace striker Mateta levelled late on to force extra time, in which he headed France in front after Egypt's Omar Fayed was sent off.
Michael Olise then sealed the win on 108 minutes and France, looking for their second Olympic men's football gold medal and first since 1984, will now face Spain at the Parc des Princes in Paris on Friday.
"When you see France picking up medals all over the place, you say to yourself it is up to us now to not let everyone down," said France coach Henry.
"You don't want to be the team who don't win a medal so at least that is done. Now we will see what colour we get, but honestly I am living a dream here and I don't want to wake up."
France hit the woodwork through Loic Bade late in the first half and were caught out by a sucker punch when Saber fired Egypt ahead against the run of play on 62 minutes.
The hosts then pushed frantically for an equaliser and struck the woodwork twice in a matter of seconds, captain Alexandre Lacazette heading off a post and Bade nodding the follow-up against the bar.
The leveller arrived in the 83rd minute, with new Bayern Munich signing Olise the creator as he cut through the middle on a driving run before playing in Mateta to finish.
France hoped to find a winner before extra time, but a penalty appeal after Fayed blocked a Bade header with his hand was dismissed after a long VAR review.
Egypt were quickly reduced to 10 men in extra time when Fayed — already booked for arguing against the penalty call — saw yellow again for chopping down Desire Doue.
France went ahead in the 99th minute when Kiliann Sildillia headed Olise's delivery back across goal for Mateta to head in his fourth goal of the tournament.
Egypt and Morocco to fight for bronze
The excellent Olise fired in the third at the start of the second half of extra time after a clearance struck Doue and fell into his path and France celebrated wildly at full-time.
Earlier, substitute Juanlu Sanchez struck a late winner for Spain as they fought back to beat Morocco in the first semi-final in Marseille.
Morocco had led through a Soufiane Rahimi penalty towards the end of the first half, a sixth goal at the Olympics for the tournament's top scorer, and his fourth to come from the spot.
That sent the large Moroccan support at the Stade Velodrome wild, but Spain kept their cool to equalise through their own star man in the 66th minute.
Fermin Lopez, a member of Spain's triumphant Euro 2024 squad, who scored twice in the Olympic quarter-final against Japan, pounced in the 66th minute when the ball broke loose in the box and fired low into the net to make it 1-1.
With the prospect of extra time looming, Spain won it in the 85th minute as Lopez found Sanchez bounding into the area, and he sent a shot low into the far corner.
Morocco now go to Nantes for the bronze medal match on Thursday against their North African rivals Egypt. — AFP
Oman Observer is now on the WhatsApp channel. Click here