Kylian Mbappe made history as France booked their place in the World Cup's knockout rounds with an unconvincing 1-0 Group C defeat of Peru.
France were fortunate in their 2-1 opening win over Australia and they had slices of luck again at the Ekaterinburg Arena on Thursday.
Mbappe's goal, which came from close-range after Olivier Giroud's shot took a wicked deflection to beat goalkeeper Pedro Gallese, saw the 19-year-old become the youngest player to score for France at a major international tournament.
As they did in losing narrowly to Denmark, Peru had plenty of chances, returning captain Paolo Guerrero firing at Hugo Lloris and Pedro Aquino clipping the post with a super strike from range.
However, Peru were unable to find a way through and Ricardo Gareca's side - who have yet to find the net in Russia - are certain to be knocked out.
Denmark look set to join France in the last 16 after their 1-1 draw with Australia, but they need a point against Les Bleus in their final outing to be certain of progressing.
Lloris was making his 100th France appearance and the goalkeeper was almost tested by an ambitious strike from Yoshimar Yotun, but the shot from the halfway line drifted wide.
Antoine Griezmann - who signed a new Atletico Madrid contract on Monday - had France's first opportunity in the 11th minute but Euro 2016's top scorer fired wide, while Paul Pogba also failed to work Peru goalkeeper Gallese.
Chances were flowing for France, Raphael Varane missing with a header before Gallese saved with his legs to deny Griezmann after Giroud found his strike partner with a headed pass.
But France's early intensity started to fade and Peru should have taken advantage, yet Guerrero shot straight at Lloris on the turn after Christian Cueva found him in the box.
19 - Kylian Mbappe (19 years & 6 months) is the youngest France 🇫🇷 player ever to score in a major tournament 🏆 (World Cup + EURO). Speechless.— OptaJean (@OptaJean) June 21, 2018
That miss proved key as Mbappe's historic World Cup moment gave France a 34th-minute lead.
Pogba slid Giroud into the area and when the striker's shot looped over Gallese via a deflection off Christian Ramos, Mbappe could not miss from inside the six-yard box.
Gallese prevented Lucas Hernandez from doubling the France lead as Peru ended the first half on the ropes.
What a hit!— FOX Soccer (@FOXSoccer) June 21, 2018
France are saved by the woodwork on a SUPERB strike from Aquino. pic.twitter.com/jcJzh4xWl7
Peru coach Gareca sent on Anderson Santamaria and Jefferson Farfan at the break, while Samuel Umtiti shook off a dead leg, before Aquino clipped the outside of the post with a swerving drive from 25 yards.
Andre Carrillo fired over the crossbar and Farfan finding the side-netting as Peru grew increasingly desperate to keep their World Cup hopes alive.
Substitute Ousmane Dembele - dropped for Giroud - could have wrapped up the points in the 82nd minute but fired wide, as France appeared to have settled for a one-goal victory.
With Peru's record scorer Guerrero wasting a late free-kick, Didier Deschamps' squad safely held on to secure their place in the knockout stages.