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 and 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 month`s 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 year`s tournament by thrashing Andorra 6-0 while Sweden`s 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 percent 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.
The other playoff teams will be Estonia and Montenegro -- two more potential Euro newcomers -- along with Croatia, Portugal, Ireland, Czech Republic and Turkey.
The draw for the playoffs will be made in Krakow on Thursday.
Spain, England, Germany, Netherlands and Italy had already qualified along with co-hosts Poland and Ukraine.
France, needing a draw at home to Bosnia to top Group D, showed they still had an appetite for drama as they fell behind to an exquisite curling shot from Bosnia striker Edin Dzeko five minutes before halftime.
That would have condemned France to the playoffs but, with 12 minutes left, Nasri was tripped by Emir Spahic just inside the box and the midfielder clinically scored from the spot.
"We played poorly in the first half and that was partly because of the game Bosnia played," France coach Laurent Blanc, who took charge in August 2010, told a news conference.
"I told the players that if they wanted to go to the playoffs they`d just have to play like that. It was a nerve-wracking match."
Greece scored twice in the final 11 minutes to top Group F after David Targamadze had fired hosts Georgia into a 19th minute lead.
Substitute Giorgos Fotakis levelled for the 2004 European champions from long range and surprise call up Angelos Charisteas struck the winner five minutes from time in his first international since the 2010 World Cup.
"These are difficult times for Greece and the Greek people so I hope we have given them something to smile about," said Greece coach Fernando Santos.
Croatia, who beat Latvia 2-0, took second spot to reach the playoffs.
The Group H showdown between Denmark and Portugal started with the teams level on points at the top of the group and the visitors, with five straight competitive wins under coach Paulo Bento behind them, only needing a draw to qualify.
Instead, Denmark eased through, Michael Krohn-Dehli putting them ahead after 13 minutes and Nicklas Bendtner adding a second just after the hour. The otherwise ineffective Cristiano Ronaldo pulled one back late on with a trademark dipping free kick.
"We were playing against two of the best wingers in the world (Ronaldo and Nani), but we didn`t see much of them for almost the entire match," said Denmark captain Thomas Sorensen.
Portugal finished level on points with third-placed Norway, who beat Cyprus 2-1, but crawled into the playoffs by virtue of their better overall goal difference in the group with the two sides being level on their head-to-head records.
Russia`s Alan Dzagoyev scored twice as they beat Andorra 6-0 to finish top of Group B while Sebastian Larsson, with a penalty, and Ola Toivonen scored twice in as many minutes as Sweden beat Group E winners Netherlands 3-2.
Ireland`s 2-1 win over Armenia gave them second place in Russia`s group and a shot at the playoffs.
Turkey took second spot in Group A as their 1-0 win over Azerbaijan allowed them to leapfrog Belgium while in Group I Czech Republic snatched second place from Scotland with a 4-1 win in Lithuania.
Two goals from David Silva and one from David Villa, his 50th for Spain, undid the Scots.
Estonia, who had already finished their qualifiers, were handed second place in Group C after Serbia, who were one point behind them, slumped to a 1-0 defeat in Slovenia with Nemanja Vidic missing a second-half penalty.
Italy, who had already made sure of top spot, completed their campaign unbeaten thanks to a 3-0 win over Northern Ireland, helped by a brace from Antonio Cassano.