Samir Nasri's 78th minute penalty ensured France's qualification for Euro 2012 at the expense of Bosnia-Herzegovina.
Requiring a win to leap-frog France in Group D, Bosnia appeared on the brink of causing a upset after Edin Dzeko gave the visitors the lead with a stunning 20-yard strike.
The effort was typical of Dzeko's season thus far, and it was left to see whether Bosnia could hold on to claim their place in Ukraine and Poland.
However, it was not to be, as Nasri tricked his was through and earned a penalty with 12 minutes left, which he dully converted himself to send France through.
"This was the most important of my career," he said. "I would prefer to score less often if I can score goals like this one."
"We had to keep persevering, to keep fighting and not give up," he said. "That is what I did to get the penalty. There was big pressure, but I took the ball and I did not ask. I had to take my responsibilities."
Dzeko's side are now consigned to the play-offs where they will be unseeded for Thursday's draw.
While Nasri and Dzeko were sweating over their passage through to Euro 2012, there were no such worries for David Silva, whose Spain side beat Scotland 3-1 in Alicante.
Silva scored twice in the first half and then laid on a third for David Villa, who netted his 50th international goal, helping secure Spain's eighth win in the group stage.