France make Olympics men's football final for the first time in 40 years.
Hosts France will play an Olympic men's football final for the first time in 40 years after beating Egypt 3-1 in extra-time at the Lyon stadium on Monday
They will face Spain for the gold medal.
France fought back after conceding their first goal in the tournament when Mahmoud Saber grabbed a stunning lead for Egypt before Jean-Philippe Mateta levelled with a late strike.
Mateta got a double before Michael Olise scored in extra-time to earn Thierry Henry's side the victory and extend their quest for a second Olympic title in Friday's final at Parc des Princes against Spain, who earlier beat Morocco 2-1.
"What a night! All credit to the players. Egypt were really good today but we never stopped going after the win and the fans pushed us forward," coach Henry said.
"We have secured a medal now but we have one more step to go to win our first football gold medal after 40 years. Now Spain await us in the final and it's going to be a big game."
Egypt, who were playing their third Olympic semi-final, had more shots on goal during the first half before Saber opened the scoring in the 62nd minute, capitalising on a rebound to power in a second attempt.
France, who hit the woodwork three times throughout the match, equalised when Mateta finally found the net seven minutes from time from an Olise pass through Egypt's backline.
Egypt went down to 10 men early in extra time when Omar Fayed got a second yellow card for a foul on Desire Doue and they were dealt a further blow when Mateta scored again to put France ahead with a towering header in the 99th minute.
"This was the night of my dreams," Mateta said. "But I need one more night now to keep dreaming. This is for the fans, they kept chanting even after we went behind in the score."
Olise also got on the scoresheet three minutes into the second half in extra-time to seal the win and send Egypt to the bronze-medal match against confederation rivals Morocco in Nantes on Thursday.
Spain beat Morocco, reach second straight Olympics final
Spain reached their second successive Olympic men's football final when they beat Morocco 2-1 thanks to second-half goals from Fermin Lopez and Juanlu Sanchez at Marseille Stadium on Monday.
Spain fought back after Morocco went ahead to earn the chance to improve on their silver medal at the Tokyo Games in Friday's final at the Parc des Princes.
In an extended first-half following an injury to referee Ilgiz Tantashev, who had to be replaced, Morocco opened the scoring in the 37th minute when the tournament's top-scorer Soufiane Rahimi converted a penalty for his sixth Olympic goal following a Pablo Barrios foul.
The 28-year-old Al Ain striker has netted for Morocco in every match at the Games.
Uzbekistani Tantashev was unable to continue after a Spanish player fell on his ankle and he was replaced by the fourth official, Glenn Nyberg.
Spain were more dangerous after the break and equalised in the 66th minute when Barcelona's Lopez pounced on some sloppy defending by Morocco to steal the ball in the box and strike home.
Substitute Sanchez earned the Spaniards the lead five minutes from time after a fine team move from the right and a low shot from a tight angle.
"Morocco were pushing hard, they were backed by their fans, but at halftime it was clear to us that we couldn't let this slip away from us," Sanchez said.
"Now it's time to recover because we have a very nice game in four days."
Morocco came close to levelling in stoppage time but were denied and will play for the bronze medal in Nantes on Thursday.