LVIV, Ukraine — Germany advanced to a quarterfinal against Greece after beating Denmark 2-1 on Sunday in their last Group B match at the European Championship.
The Danes were eliminated.
Lukas Podolski opened the scoring for Germany in the 19th minute and Lars Bender slotted home the winner in the 80th after Michael Krohn-Dehli had equalized for Denmark in the first half.
Germany controlled possession, had the best chances and were never really challenged by the Danes, who go home after stunning the Netherlands in the first match but losing to Portugal in the second.
Germany seized the initiative from the kickoff and came close twice before Podolski, playing his 100th international match, scored his first goal of the tournament.
Mario Gomez set him up with a deft backheel touch following Thomas Mueller's low cross from the right flank.
Denmark replied just five minutes later with Krohn-Dehli heading in the equalizer from a set piece that stunned the German defense. A corner found Nicklas Bendtner, who headed the ball into the area where Krohn-Dehli nodded home his second goal at Euro 2012.
Jakob Poulsen missed a chance to put Denmark in the driver's seat at the start of the second half when his shot grazed the outside of German goalkeeper Manuel Neuer's right post.
After that scare, the Germans were firmly in charge and denied Denmark any real chance of getting back into the game.
Coach Morten Olsen's men were already looking tired when Bender, replacing suspended right back Jerome Boateng, picked up a pass from Mesut Oezil and made it 2-1.
Germany finished on top of the group with a perfect record of three wins and will face Euro 2004 champion Greece on Friday in Gdansk.