Lukas Podolski scored a goal in his 100th appearance for Germany and Lars Bender scored in the dying minutes in a 2-1 victory over Denmark on Sunday at Arena Lviv in Ukraine that earned it a place in the quarterfinals of the European Championships.
Bender hit the winning goal in the 80th minute as Germany recorded a full nine points from three matches to top Group B. Denmark has three points.
Podolski found the net in the 19th minute but Michael Krohn-Dehli evened things just five minutes later.
Meanwhile, Portugal eliminated winless Netherlands with a 2-1 victory at Metalist Stadium in Kharkiv.
Cristiano Ronaldo propelled Portugal to the quarterfinals with six points from three matches, hitting goals in the 28th and 74th minutes.
Rafael van der Vaart hit the first goal in the 11th minute.