Jacob Poulsen's first goal for Denmark secured their place in next summer's FIFA World Cup finals. The Aarhus midfielder struck from long range, with goalkeeper Andreas Isaksson partly at fault. The visitors had two second-half strikes disallowed and were unable to capitalise on their dominance after the break, with Zlatan Ibrahimovic a central figure.
Goalscorer Poulsen was denied early on when his poor header met with a good scrambling save by Isaksson. Daniel Majstorovic's fine challenge then denied Dennis Rommedahl on the edge of the box after a trademark jinking run, and Martin Jorgensen fired just wide from 30 yards as Denmark started the stronger.
Christian Poulsen made a fine block on Sweden's Samuel Holmen as he prepared to shoot and on the counter-attack Michael Jakobsen had his fierce drive tipped over by Isaksson. Defender Majstorovic had Sweden's best chance of the first half, but his header from Kim Kallstrom's corner was easily saved by Thomas Sorensen.
The visitors appeared to have been fired up by long-serving coach Lars Lagerback's half-time words and Simon Kjaer prevented a low cross reaching Ibrahimovic to keep Denmark level. The Barcelona striker then headed Kallstrom's cross over. But Denmark responded, and Rommedahl volleyed wide after neat interplay with Jon Dahl Tomasson.
The referee's assistant came into play twice in three minutes as Henrik Larsson was ruled narrowly offside when neatly converting Ibrahimovic's crafty backheel, and a whistle against the former Inter man meant Anders Svensson's diving header counted for nothing. Ibrahimovic's low cross was then mis-controlled by Larsson, taking the ball away from his onrushing namesake Sebastian.
Rommedahl's poor pass behind Tomasson ended a promising Danish attack after Nicklas Bendtner did well, and the winger's poor touch robbed another move of its momentum - Majstorovic denying Tomasson after Rommedahl recovered his poise to pick out the striker.
The crucial moment came as Poulsen's low drive from 25 yards, after Bendtner's lay-off, bounced beyond Isaksson's ineffectual dive to break the midfielder's international duck and put his side in front.
Lars Jacobsen held up Ibrahimovic, whose cross was then fielded by Sorensen, and the impressive Kjaer's crucial clearance stopped a dangerous ricochet reaching Sweden's focal point.
Arsenal forward Bendtner curled wide after a neat move, but the Danes were immediately able to celebrate as the final whistle blew.