Lars Bender scored the winner 10 minutes from time as Germany took their place in the quarter-finals of Euro 2012 as convincing winners of Group B.
The 23-year-old Bayer Leverkusen player poked in late on to end Denmark's dream of repeating their heroics of 1992.
Germany had taken a 19th-minute lead through Lukas Podolski, only for Michael Krohn-Dehli to head in six minutes later and give Denmark hope.
Germany, who qualify with a 100% record, play Greece in the last eight.
For much of this game, this was a dominant display by Germany, inspired by Sami Khedira's midfield generalship, Thomas Mueller's prodigious work on the wings and a workrate and ambition that glowed throughout the team.
The long journeys from Germany's team base in Poland to Ukraine have not gone down well with the squad but having topped the group with victory in Lviv, they have earned a quarter-final in Gdansk, the city where they are based.
The last time Denmark and Germany met in a competitive fixture had been memorable for very different reasons. The final of the 1992 European Championship saw the Danes, late replacements for the banned Yugoslavia, beat the Germans in the final to complete one of the most surprising tournament victories in history.
Denmark have struggled to escape the shadow of that victory ever since but with the sublime young talents such as Christian Eriksen in the side there was a sense of optimism that 20 years on the seemingly impossible might just be possible all over again.
Germany were in no mood for a repeat, however. For long periods of this match Joachim Loew's side were untouchable in possession with Mueller and Bastian Schweinsteiger dictating from midfield.
Whether breaking past an opponent from wide on the right flank, or erupting with dramatic suddenness through the middle of a defence, Mueller's early runs were an exhilarating blend of grace and devastation.
The Bayern Munich midfielder was a constant danger, but twice in the early moments he spurned good chances, failing to make clean contact when the ball broke to him six yards from goal and shooting narrowly over with the goal at his mercy.
It was no surprise when Mueller created the opening goal for Germany, exchanging passes with Mesut Ozil, before cutting the ball back across the penalty area from the right where Podolski thumped it ruthlessly beyond Denmark goalkeeper Stephan Andersen.
It was the perfect way to celebrate becoming the youngest European player, at the age of 27, to reach 100 caps.
Denmark were bystanders for much of the opening period, unable to prevent or disrupt the German passing carousel and relying on intermittent long-range attacks. But what became clear quite quickly was their dominance at set-pieces.
Arsenal striker Nicklas Bendtner had won an early header in the penalty area and when he rose again to meet Lars Jacobsen's 23rd-minute corner, Germany were found wanting. The Dane rose majestically to direct the ball back across goal, where Krohn-Dehli headed it decisively beyond Germany goalkeeper Manuel Neuer.
But while Denmark visibly grew in confidence after the goal, Germany continued to dominate. Mario Gomez was always on hand to provide the German attack with a focal point and might have done better on two occasions before half-time when the ball broke kindly to him.
Khedira was also guilty of wastefulness, exchanging passes with Gomez only to prod the ball wide with the outside of his right foot when the ball broke to him.
Denmark were, however, unbowed. Starved of possession and chasing shadows, the clenched fist of their coach Morten Olsen at half-time said it all.
It had been a gesture of unexpected defiance in the face of German domination and his time almost responded.
Denmark looked a different side early in the second half and should have snatched an unlikely lead when Bendtner collected Simon Poulsen's clever pass in the penalty box before laying the ball off to Jakob Poulsen, who skimmed the outside of the post with his low shot.
The fluency Germany had found for long periods was being disrupted by a Denmark side that tackled, battled and denied space, their uncomplicated, direct approach putting their more celebrated opponents under serious duress.
The introduction of Bayern Leverkusen striker Andre Schuerrle appeared to help Germany regain their dynamism, however. The 21-year-old almost made an immediate impact, gathering Khedira's delightfully-weighted pass before directing a fierce, low shot across goal which Andersen did well to push to safety.
Germany by the numbers
- Lukas Podolski has become the youngest European player to reach 100 caps.
- Germany were playing with their youngest line-up in a European Championship match with an average of 25 years and 107 days.
- This is the first time Germany have completed a European Championship group stage with a 100% record.
- Source: Opta Sports
Bendtner was unfortunate moments later when he stretched to lift a shot high into Neuer's hands, while Germany defender Holger Badstuber pulled at his shirt.
But with Denmark tiring, Bender broke forward covering 60 yards to take advantage of Simon Poulsen's slip and roll the ball beyond Andersen. It was the youngster's first goal for Germany on his first start for his country and the moment that decided the outcome of Group B.
Agger rose high above Badstuber to head over as Denmark continued to push but the chance had gone and the dream was over.
For Germany, it remains very much alive.
Sorry, we were unable to load match stats, please try again.
Live Text Commentary
Full Time The referee blows his whistle to end the game.90:00 +2:28
Daniel Agger is caught offside. Indirect free kick taken by Manuel Neuer.90:00 +2:07
The assistant referee signals for offside against Andre Schurrle. Stephan Andersen restarts play with the free kick.90:00 +1:22
The assistant referee signals for offside against Miroslav Klose. Stephan Andersen takes the direct free kick.90:00 +0:13
Free kick awarded for a foul by Christian Poulsen on Miroslav Klose. Bastian Schweinsteiger produces a strike on goal direct from the free kick.88:21
Michael Krohn-Delhi is penalised for handball and concedes a free kick. Manuel Neuer takes the direct free kick.85:46
The referee blows for offside against Simon Poulsen. Free kick taken by Manuel Neuer.82:56 Substitution
Substitution Thomas Muller goes off and Toni Kroos comes on.82:56
Outswinging corner taken right-footed by Lars Jacobsen, Header on goal by Daniel Agger from inside the box goes harmlessly over the target.81:39 Substitution
Substitution Jakob Poulsen goes off and Tobias Mikkelsen comes on.79:38
Assist by Mesut Ozil.79:38 Goal scored
Goal! - Lars Bender - Denmark 1 - 2 Germany A goal is scored by Lars Bender from inside the penalty box to the bottom left corner of the goal. Denmark 1-2 Germany.77:51 Substitution
Substitution Niki Zimling leaves the field to be replaced by Christian Poulsen.76:16
The ball is delivered by Thomas Muller, Daniel Agger makes a clearance.75:03
The assistant referee flags for offside against Miroslav Klose. Direct free kick taken by Nicklas Bendtner.73:14 Substitution
Substitution (Germany) makes a substitution, with Miroslav Klose coming on for Mario Gomez.72:47
The ball is crossed by Sami Khedira, clearance by Michael Krohn-Delhi.70:26
Niki Zimling takes a shot. Save by Manuel Neuer. Short corner taken by Michael Krohn-Delhi from the left by-line. Centre by Christian Eriksen.70:13
Michael Krohn-Delhi sends in a cross, clearance made by Holger Badstuber.66:51
Andre Schurrle takes a shot. Save made by Stephan Andersen.
Direct free kick taken by Bastian Schweinsteiger.62:57 Substitution
Substitution Andre Schurrle on for Lukas Podolski.62:57
Bastian Schweinsteiger takes a shot. Blocked by Simon Kjaer. Free kick awarded for a foul by Nicklas Bendtner on Bastian Schweinsteiger.62:22
Thomas Muller crosses the ball, Simon Kjaer manages to make a clearance.61:40
Corner taken left-footed by Mesut Ozil from the right by-line, save by Stephan Andersen.61:32
Sami Khedira sends in a cross, Niki Zimling makes a clearance.60:12
Thomas Muller delivers the ball, clearance by Daniel Agger.57:00
Simon Poulsen is ruled offside. Direct free kick taken by Mats Hummels.53:56
Unfair challenge on Niki Zimling by Thomas Muller results in a free kick. Daniel Agger takes the direct free kick.50:14
The ball is delivered by Simon Poulsen. Effort from the edge of the area by Jakob Poulsen goes wide of the left-hand upright.49:02
Mario Gomez produces a right-footed shot from outside the penalty box and misses left.48:00
Centre by Philip Lahm, save by Stephan Andersen.47:20
A cross is delivered by Mesut Ozil, Simon Kjaer gets a block in.46:55
The referee penalises Thomas Muller for handball. Direct free kick taken by William Kvist Jorgensen.45:01
The referee blows his whistle to start the second half.45:00 +1:10 Half time
Half Time The referee calls an end to the first half.44:54
Simon Kjaer takes a shot. Bastian Schweinsteiger gets a block in.44:49
Jakob Poulsen sends in a cross.44:03
Corner taken by Christian Eriksen from the left by-line played to the near post.43:10
Nicklas Bendtner concedes a free kick for a foul on Mats Hummels. Mats Hummels takes the free kick.42:22
Free kick awarded for an unfair challenge on Stephan Andersen by Mario Gomez. Stephan Andersen takes the direct free kick.40:30
Effort on goal by Sami Khedira from deep inside the penalty area misses to the right of the goal.38:50
Niki Zimling takes a shot. Blocked by Mats Hummels.37:23
The ball is delivered by Sami Khedira.35:15
Free kick awarded for a foul by Simon Kjaer on Thomas Muller. Mesut Ozil takes the free kick. Lukas Podolski produces a left-footed shot from just outside the area that goes harmlessly over the bar.33:05
Inswinging corner taken by Mesut Ozil from the right by-line played to the near post, clearance by Daniel Agger.30:44
Free kick awarded for a foul by Daniel Agger on Thomas Muller. Mesut Ozil delivers the ball from the free kick left-footed from right wing, save by Stephan Andersen. Short corner taken by Bastian Schweinsteiger. Effort on goal by Mario Gomez from inside the box misses to the right of the target.29:02
Unfair challenge on William Kvist Jorgensen by Philip Lahm results in a free kick. Free kick taken by Simon Kjaer.28:00
Michael Krohn-Delhi has an effort at goal from long distance that goes wide left.27:21
Lars Bender sends in a cross, Daniel Agger makes a clearance.24:26
The assist for the goal came from Nicklas Bendtner.24:26 Goal scored
Goal! - Michael Krohn-Delhi - Denmark 1 - 1 Germany Michael Krohn-Delhi scores a headed goal from close range. Denmark 1-1 Germany.22:53
Outswinging corner taken by Lars Jacobsen from the right by-line.20:30
Mario Gomez gives away a free kick for an unfair challenge on Niki Zimling. William Kvist Jorgensen restarts play with the free kick.18:26
Assist by Mario Gomez.18:26 Goal scored
Goal! - Lukas Podolski - Denmark 0 - 1 Germany Goal scored by Lukas Podolski from inside the penalty box to the top right corner of the goal. Denmark 0-1 Germany.15:37
Mesut Ozil fouled by Niki Zimling, the ref awards a free kick. Mesut Ozil delivers the ball from the free kick left-footed from right channel.14:44
Unfair challenge on Mats Hummels by Nicklas Bendtner results in a free kick. Lars Bender restarts play with the free kick.13:10
Nicklas Bendtner has an effort at goal from long distance that goes wide left.11:48
Mario Gomez produces a left-footed shot from just outside the area that goes harmlessly over the bar.5:07
The ball is delivered by Lukas Podolski, Thomas Muller takes a shot. Save by Stephan Andersen.4:13
Simon Poulsen produces a cross, blocked by Lars Bender. Inswinging corner taken by Michael Krohn-Delhi, Nicklas Bendtner takes a shot. Save by Manuel Neuer.2:25
The ball is crossed by Sami Khedira, Lars Jacobsen makes a clearance.1:48
Shot on goal by Thomas Muller from just inside the area goes over the target.1:41
Centre by Sami Khedira.1:12
The referee blows for offside. Mats Hummels restarts play with the free kick.0:00
The game kicks-off.
Live data and text provided by our data suppliers
CommentsJump to comments pagination
Comment number 34.sambuczynskyj
18th June 2012 - 17:31
Comment number 33.jgore
18th June 2012 - 17:18
Comment number 32.Dickster1981
18th June 2012 - 15:43
Comment number 31.stevdk
18th June 2012 - 14:27
Comment number 30.RememberScarborough
18th June 2012 - 14:25