Denmark, Russia, Greece, Sweden and France qualify for 2012 finals while Scotland miss out and Ireland make playoffs.
Russia made sure of their ticket for the tournament by thrashing Andorra 6-0 and Euro 2004 winners Greece topped their group to qualify with a 2-1 win in Georgia.
Sweden's 3-2 victory over Netherlands meant they also went through as the best of the runners-up in the nine groups. Their win ended a 100 percent record for the Dutch in the section.
Sweden had taken an early lead through Kim Kallstrom before the Dutch - winners of the title in 1988 - stormed back to take a 2-1 lead with goals by Klaas-Jan Huntelaar and Dirk Kuyt.
Their lead only lasted two minutes as Sebastian Larsson levelled from the penalty spot and two minutes after that in the 53rd minute the hosts got their winner through Ola Toivonen.
Denmark upset the odds as they beat Portugal 2-1 in their final Euro 2012 Group H qualifier to top the table at the expense of the Portuguese.
Denmark, European champions in 1992, secured their place with goals by Michael Krohn-Dehli and Sunderland striker Nicklas Bendtner - Portuguese superstar Cristiano Ronaldo scored a consolation goal in time added on.
Portugal even miss out on the best runners-up spot that secures an automatic place at the finals and will have to fight their way through a play-off to be present at a tournament where they reached the final in 2004.
Greece reached their third straight European Championship on Tuesday after substitute Giorgos Fotakis and veteran Angelos Charisteas scored late goals to secure a 2-1 win over Georgia in their final qualifier.
The 2004 champions won Group F ahead with 24 points, two better than Croatia which beat Latvia 2-0 to secure at least a spot in next month's playoff. A draw would have been enough to put Greece through to next year's tournament in Poland and Ukraine.
Russia routed minnow Andorra 6-0 to end up as Group B winners.
Alan Dzagoev put Russia ahead in the fifth minute and defender Sergei Ignashevich made it 2-0 by scoring off Andrei Arshavin's free kick in the 26th.
Roman Pavlyuchenko scored his fourth goal in seven matches on the half hour mark before Dzagoev sent Russia into the break with a 4-0 lead.
Denis Glushakov scored his first goal for Russia in the 69th before Diniyar Bilyaletdinov capped the rout by scoring with a low shot from 25 meters (yards) out in the 78th.
Russia finished with 23 points, two points ahead of Ireland which qualified for next month's Euro 2012 playoff after a 2-1 victory over Armenia in Dublin.
David Silva scored twice and provided on David Villa's 50th goal for Spain as the defending champions denied Scotland a playoff place with a 3-1 win.
Scotland's loss allowed the Czech Republic to overtake them and finish second in Group I after they beat Lithuania 4-1. Scotland needed to match the Czech's result to clinch a spot in next month's playoff.
World Cup champion Spain has won 14 straight competitive matches and finished Group I perfect after an eighth straight victory.
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 in Poland and Ukraine.
Edin Dzeko had given Bosnia, who needed a win to steal top spot from the French, the lead just before halftime.
The other playoff teams will be Estonia and Montenegro -two more potential Euro newcomers - along with 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.