Denmark secured their passage to South Africa with a controversial 1-0 victory over their Scandinavian neighbours Sweden in Copenhagen.
The home side won thanks to Jacob Poulsen's first international goal, which came in the 78th minute after a period in which Sweden had dominated and had a goal disallowed due to a debatable offside decision.
The former Celtic and Manchester United striker Henrik Larsson, now 38, believed he had struck his first international goal in more than a year when he slotted past Thomas Sorensen in the Denmark goal after a backheel from Barcelona's Zlatan Ibrahimovic. Swedish celebrations turned to recrimination when the Spanish referee ruled the goal out.
Ibrahimovic was terrific throughout, tormenting the Liverpool defender Daniel Agger, who was clearly rusty in his first appearance after four months out through injury. Denmark have had to deploy a different defence in every qualifying match, so being unbeaten group winners is a spectacular achievement – as was Poulsen's winner, a powerful drive from 35 yards that bounced just in front of the former Manchester City goalkeeper Andreas Isaksson and into the net.
The result was also good for Cristiano Ronaldo's Portugal, who beat Hungary 3-0 to leapfrog the Swedes into second place. Despite their poor start to the qualifying campaign, Carlos Queiroz's team now only need to match Sweden's result in the final match to be sure of a play-off place. Portugal face Malta at home while Sweden entertain Albania.
Serbia are certain to be in Africa next summer after routing Romania 5-0 in Belgrade, while France secured runners-up spot and a place in the play-offs with a 5-0 victory over the Faroe Islands with Arsenal's William Gallas and Chelsea's Nicolas Anelka among the goals. Austria beat Lithuania 2-1.
Two goals from another Arsenal player, Philippe Senderos, helped Switzerland to a 3-0 win in Luxembourg that means only a freakish set of results will stop the Swiss from qualifying. Two goals in two minutes from the Arsenal defender enabled Switzerland to plant one foot in South Africa as winners of Group Two and simultaneously avenge the most humiliating defeat in their history, when they lost 2-1 to Luxembourg in their opening group game. Greece look likely to take the a play-off spot after they beat Latvia 5-2. Israel beat Moldova 3-1 to keep their slim chance of claiming the runners-up spot alive.
In Group Three Slovenia won 2-0 in Slovakia to keep alive their chances of topping the group while Czech Republic beat Poland 2-0 to keep in the hunt for a play-off spot.
Group Five winners Spain were made to work for their victory in Armenia which kept their 100% record alive. Cesc Fabregas found the net in a 2-1 win. Bosnia secured second spot with a 2-0 win in Estonia while Belgium beat Turkey 2-0.