Paul Pogba scored 11 minutes from time on Monday and France went through to the quarterfinals of the World Cup with a nervy 2-0 result over Nigeria at the Estadio Nacional.
France breezed to the summit of Group E with an opening win over Honduras followed by a 5-2 thumping of Switzerland as Les Bleus were scoring for fun.
Monday's matchup with the Group F runners-up looked straightforward for France, but the Nigerians gave a good account of themselves for most of the contest before they were undone in the 79th minute by Pogba's header.
The second tally came in stoppage time courtesy of an own goal by Nigerian defender Joseph Yobo, which wrapped up the result for Les Bleus.
The win keeps France's World Cup dream alive for at least one more game as Didier Deschamps' side will face the winner of Monday's other match between Algeria and Germany on Friday.
The French had the better of the early chances as Arsenal man Olivier Giroud had a healthy shot at goal in the 15th minute, but the strike was always rising and ended up in row Z.
Nigeria worked itself into the match quickly and was not intimidated by the free-scoring French. Stephen Keshi's side looked to have taken the lead in the 19th minute when striker Emmanuel Emenike got on the end of a through ball and touched it past goalkeeper Hugo Lloris at the near post, but the goal was called back for offside.
France continued to create quality scoring chances throughout the first half as Mathieu Valbuena sent a cross into the area in the 22nd minute and Pogba did well to fire it on goal, but Nigeria goalkeeper Vincent Enyeama parried it away and the sides went into the break scoreless.
Nigeria came out of the intermission asking the questions as Stoke City man Peter Odemwingie had a solid strike on target, but Lloris was able to make the stop.
Hoping to open the game up more, Deschamps withdrew Giroud and sent Real Sociedad man Antoine Griezmann onto the pitch in the 62nd minute and the move almost paid dividends eight minutes later as Griezmann and Karim Benzema worked a nice one-two to send Benzema in on goal. The strike was stopped by Enyeama, but the ball rebounded off Benzema and looked to be heading into the empty net, but Victor Moses got back to clear it off the line.
The French dominated the final 20 minutes and heaped pressure on the Nigerian net as PSG man Yohan Cabaye had a rip from outside the box in the 77th minute following a corner kick, but it smashed the crossbar and stayed out.
Minutes later Benzema got a free header on goal from close range, but again Enyeama did well to parry it over the bar.
But the breakthrough finally came on the ensuing corner kick. Valbuena sent a well-struck ball into the box and Enyeama got a hand to it, but the ball fell to the head of Pogba, who nodded it home to give Les Bleus the lead and some relief.
Deschamps' side put the result away in stoppage time as Valbuena got down the right flank and played the ball across the face of goal hoping for a touch from Griezmann, but Yobo directed it into his own net for the own goal.