France scored twice in the final 11 minutes in Brasilia to beat Nigeria and reach the World Cup quarter-finals.
Nigeria's Emmanuel Emenike had a strike ruled out for offside before Vincent Enyeama saved Paul Pogba's volley.
But Pogba eventually headed in after an Enyeama error and Joseph Yobo diverted Mathieu Valbuena's cross into the net.
France will play the winners of Monday's late match between Algeria and Germany in the last eight at the Maracana on Friday.
The final scoreline was harsh on Nigeria, who dominated for large parts of the second half, but late mistakes from their tiring players ensured they will have to wait for their first quarter-final appearance in a World Cup.
France have pedigree in the knockout rounds, having reached at least the semi-finals on the last five occasions they have progressed past the first round at the World Cup.
Nigeria's last-16 preparations had been disrupted by a row over bonuses and, with their group victory over Bosnia-Hercegovina their only World Cup win in 11 matches, this tie was always going to prove a big ask.
But, attacking with pace down the wings through both Moses and Ahmed Musa, the Super Eagles looked threatening early on. Only a flag for offside denied the powerful Emenike the opener, when he tapped home Musa's cross.
Nigeria's goalkeeper Enyeama made the most saves of any goalkeeper in the group phase and had to be alert again to keep out Pogba's fierce close-range volley as the play swept from end to end in a first half that saw both sides look vulnerable defensively.
Juventus's Pogba was being afforded a lot of space but, as was the case all over the pitch, the final ball was all too often wasteful, with Mathieu Debuchy's shot wide the only other notable attempt in a half that promised more than it delivered.
France, the 2006 runners-up, did not make it past the group stage in South Africa four years ago but they appear to be much more united as a squad in this tournament.
That togetherness was needed as Nigeria controlled the opening stages of the second half and only a sharp stop from Hugo Lloris prevented Peter Odemwingie's low shot from giving the Africans the lead.
Against the run of play Benzema almost gave France the lead. The Real Madrid man played a neat one-two with Antoine Griezmann before seeing his shot partially blocked by Enyeama and then hacked off the line by Moses.
The introduction of Griezmann for Olivier Giroud saw France emerge more as an attacking force, with Benzema playing more centrally, and the breakthrough came when Pogba headed into an empty net after Enyeama had misjudged Valbuena's corner.
And, as Nigeria pushed for a leveller, Joseph Yobo flicked Valbuena's low cross into his own net on the day he surpassed Jay-Jay Okocha's record of nine World Cup matches for the Super Eagles.
France midfielder Paul Pogba: "I have no words to describe this feeling. The whole country is behind us and scoring that goal really liberated us. I am so happy for the team and all of France.
"To score a goal for your country, especially in such an important game as this, to get into the last eight of the World Cup is one of the best moments of my life."
Nigeria coach Stephen Keshi: "I thought the referee made a lot of mistakes and was very lenient to the French players. There was a very bad tackle on Ogenyi Onazi and he is probably out for weeks."
For the best of BBC Sport's in-depth content and analysis, go to our features and video page.
France had never met Nigeria in the World Cup before
This was the first time two African nations (Nigeria & Algeria) had reached the World Cup knockout stage
Nigeria goalkeeper Vincent Enyeama recorded the most saves of any goalkeeper in the group phase
All of France's goals during this World Cup have come from inside the penalty area
France are the first team to benefit from two own goals in the same World Cup
Latest Stories
-
Electrochem Ghana condemns raid on its warehouse by thugs claiming NDC affiliation
52 minutes -
Calm restored at Ntotroso after Newmont breach attempt
1 hour -
GUTA optimistic about government addressing business concerns
1 hour -
We have only rice to feed SHS students in Greater Accra – CHASS Chairman
1 hour -
Presidency unveils official portrait of Mahama
1 hour -
Government must prioritise salt development to grow economy – MIIF Board Chair
1 hour -
Ghana begins implementation of Global Internal Audit Standards
1 hour -
We will sustain and enhance free SHS policy – Mahama
1 hour -
Omane Boamah: Stan Xoese Dogbe, you know your onions
1 hour -
‘They have what it takes, its a masterstroke’ – Austin Gamey lauds Mahama’s first 3 appointees
2 hours -
Chloe Bailey breaks silence on romance rumours with Burna Boy
2 hours -
Let celebrities breathe: Spyro tackles fans always asking for money
2 hours -
Empty Box: Message from the Morning Man
2 hours -
‘Extent of the loot will shock Ghanaians’ – Ablakwa on ORAL findings of looted state assets
2 hours -
‘Misreporting happens frequently, but we stay focused on diplomacy’ – British High Commissioner on Ghana election remarks
3 hours