(Reuters) - First-timers Bosnia joined holders Spain, England and Russia in grabbing Europe's remaining automatic spots for the 2014 World Cup finals on Tuesday as the last round of group matches ended in joy, despair and shattered nerves.
Fireworks lit the skies across Bosnia whose fans celebrated qualifying for their first major tournament as an independent nation, while bigger European names like France, Portugal and Greece were consigned to the playoffs.
There was heartbreak for Denmark, who pummeled Malta 6-0 to finish second behind Italy in Group B but were the unlucky team to miss out on the playoff spots available for the eight best runners-up from the nine European groups.
Iceland kept alive their hopes of reaching their first finals when a 1-1 draw in Norway ensured they finished second behind Group E winners Switzerland to put them in the hat for Monday's draw for November's two-legged ties.
The other countries who also get another chance to snap up a ticket to Brazil are Romania, Ukraine, Sweden and Croatia.
World and European champions Spain secured top spot in Group I with a 2-0 win at home to Georgia thanks to goals from Alvaro Negredo and Juan Mata, finishing three points ahead of the French who beat Finland 3-0.
The victory in Albacete meant the Spanish finished with 20 points from eight matches and, like six other group winners, ended their campaign unbeaten as they seek to become only the third nation to successfully defend the world title.
Negredo, who had scored in their penultimate qualifier last week, shone again for Spain while the man who set up his 26th-minute opener, Andres Iniesta, was delighted to have helped put them through in a city close to where he comes from.
"To seal qualification here, what better place could there be," Iniesta, who scored the winner that secured Spain's first World Cup in South Africa in 2010, said in a pitchside interview with Spanish television broadcaster Telecinco.
"Playing here on my home patch they treat me with a special affection. It was a nice day and a nice match to get to Brazil and I am just really happy."
Substitute Mata pounced on a loose ball and cracked home from close range in the 61st minute to make sure of the victory that extended their unbeaten run at home to 30 matches.
That result meant France's win in Paris, inspired by Franck Ribery who scored one goal and created another, was academic as the 1998 world champions had to make do with a playoff spot.
The French look unlikely to be seeded for the draw because of their world ranking which means they could face a tricky clash with another big footballing nation.
England breathed a sigh of relief when Steven Gerrard scored in the 88th minute against Poland to seal a 2-0 win after his side had held a slender lead from Wayne Rooney's opener.
Group H rivals Ukraine racked up eight goals against San Marino in the forlorn hope of any slip-up at Wembley.
"You can imagine quite a few emotions are churning around inside me," England manager Roy Hodgson told reporters.
"I died a thousand deaths every time they (Poland) crossed the halfway line which is what you do... I am, though, naturally delighted that we completed the job."
World Cup 2018 hosts Russia, who needed to avoid a heavy defeat in Azerbaijan to guarantee top spot in Group F ahead of Portugal, did just that as they were held 1-1 in Baku.
Fabio Capello's side gave Portugal, who were comfortably ahead against Luxembourg, a glimmer of hope after conceding in the 90th having led through Roman Shirokov's 15th-minute opener.
It meant that despite goals from Silvestre Varela, Nani and Helder Postiga giving Portugal a 3-0 win at home to bottom side Luxembourg, they finished a point behind Russia and will have to negotiate the playoffs to reach the finals.
Bosnians, on the other hand, will be celebrating long into the night after reaching their first major tournament since declaring independence in 1992, after Vedad Ibisevic's 68th-minute winner earned a 1-0 victory in Lithuania.
Greece were behind Group G leaders Bosnia on goal difference before their match at home to Liechtenstein and the 2004 European champions knew they needed a slip-up from the leaders to snatch top spot.
The Greeks quickly got on with their job as Dimitris Salpingidis put them ahead after seven minutes with a tap-in before Giorgos Karagounis doubled the lead in the 81st for a 2-0 win that ultimately was not enough to stop a big Bosnian party.
"This is crazy, everybody is overjoyed, screaming and dancing," said 15-year-old pupil Matea Perovic, who was heading to a fan zone in Sarajevo where the team was scheduled to appear for a late-night celebration on their return from Kaunas.
Five European teams had already cracked open the bubbly to celebrate their places at the World Cup finals before this last round of matches but it did not stop some of them adding a few more goals for good measure.
Group C winners Germany fought back from two goals down to beat runners-up Sweden 5-3 thanks to a hat-trick from Andre Schuerrle on an evening when midfielder Bastian Schweinsteiger earned his 100th cap.
There was also another victory for Group D winners and 2010 World Cup runners-up Netherlands, who overcame Turkey 2-0 away to deny their hosts a place in the playoffs as Romania overtook them in the standings with a 2-0 win at home to Estonia.
Already-qualified Italy and Belgium ended their campaigns on more modest notes with 2-2 and 1-1 draws against Armenia and Wales respectively, while Switzerland beat Slovenia 1-0 to deny the visitors a chance of the Group E runners-up spot that went to Iceland.
Croatia, who had already secured second place behind Belgium in Group A, suffered a surprise 2-0 defeat in Scotland but had done just enough earlier in the campaign to ensure the loss did not cost them a playoff spot.
It may, however, spell the end of Croatia coach Igor Stimac's tenure as he offered his resignation following the defeat with his side having taken one point from their last four group matches.
Reporting by Sonia Oxley; Editing by Ken Ferris