Berne: France grabbed a place at Euro 2012 after a late Samir Nasri penalty salvaged a 1-1 draw at home to Bosnia on Tuesday.
Greece also did it the hard way by scoring two late goals to win 2-1 in Georgia and book their ticket to the finals.
Denmark qualified with a comfortable 2-1 win over a surprisingly lacklustre Portugal who were lucky to scrape into next months playoffs in what appeared to be the most attractive fixture on an evening filled with drama and suspense.
Russia made sure they would on the plane to next years tournament by thrashing Andorra 6-0, while Swedens 3-2 victory over Netherlands meant they also qualified as the best of the runners-up in the nine groups.
Victory for the Swedes also ended the prospect of a perfect record for the Dutch in the section.
Germany, 3-1 winners over Belgium, and Spain, who beat Scotland by the same score, finished with 100 per cent records and in doing so cost their opponents a playoff spot.
Bosnia, who have never qualified for a major tournament, finished second behind France in Group D and will play off over two legs for a place at the tournament.