Pele told Kylian Mbappe to "keep your head up" after the France striker missed the shoot-out penalty that condemned Les Bleus to an early exit from Euro 2020.
As Switzerland celebrated a stunning win in Bucharest, prevailing on spot-kicks after a breathtaking 3-3 draw in the round of 16, Brazil great Pele had sympathy for misfiring Mbappe, who endured a miserable tournament.
Although Mbappe has established himself among the best strikers in the world with Paris Saint-Germain, he failed to find the back of the net in four games at these European finals.
The 22-year-old seemed fated to flounder from the spot once the game went to penalties, and that was how it proved, Mbappe stepping up with France trailing 5-4 and seeing his strike saved by Yann Sommer.
"Keep your head up, Kylian!" Pele wrote on Twitter. "Tomorrow is the first day of a new journey, @KMbappe"
Mbappe said in a late-night Instagram post that it would be "hard to sleep but sadly these are the risks of this sport that I love so much".
He failed to score in the tournament despite taking 14 shots. At the point of France's tournament exit, only Cristiano Ronaldo (five goals from 15 shots) and Alvaro Morata (two goals from 15 shots) had taken more goal attempts in the Euros.
A World Cup winner with France as a 19-year-old, this time Mbappe experienced the bitter disappointment of tournament football.
As France licked their wounds, Switzerland began to look forward to a quarter-final against Spain in St Petersburg on Friday.
Switzerland head coach Vladimir Petkovic said his team's win was "very pleasing and very significant".
"I wasn't able to speak and talk towards the end of the match. I was done, I'd lost my voice," Petkovic told a news conference.
"But the team over the 120 minutes did a fantastic job with this readiness to fight for the team and we managed to impose our game and follow our match plan.
"We had enough fuel in the tank, maybe more than France, and we showed that over the 120 minutes."
Petkovic suggested he had probably sweated out "a couple of litres" during the game.
He said: "After such a great success you're happy and satisfied – this was the icing on the cake, a penalty shoot-out, and it was the only penalty Yann saved and I was happy for the team but I needed a lot of emotions over the 120 minutes and such a victory helps us mentally and also in terms of recognition.
"This team showed the willingness and has the power to go even further."
France led 3-1 when Paul Pogba hit a stunning 25-yard strike in the 75th minute, after an earlier Karim Benzema double, but Haris Seferovic's second goal of the game was followed by a late leveller by Mario Gavranovic.
"For normal people and players it's impossible to turn it around again, but we were a super class team," Petkovic said.
"With such a performance and commitment you can't be not satisfied, but now we've reached a new level and I will ask my team to do the same again and again."