Germany captain Michael Ballack scored with a spectacular free-kick in the 49th minute to give his side a 1-0 victory in a Group B match played in Vienna and a place in the quarter-finals. ( dpa )
Spanish referee Manuel Gonzalez sent German coach Joachim Loew and his Austrian counterpart Josef Hickersberger into the stands in the first half for arguing with the fourth official.
Germany needed just a draw to join Croatia in the second round, while the co-hosts needed to beat Germany and hope that Croatia would beat Poland in their final game.
But while the Croats, although they fielded a second-string side, managed to beat Poland 1- 0 in Klagenfurt, an Austrian victory was never on the cards as Germany dominated proceedings.
The three-time champions were let down by poor finishing though and it took a spectacular effort from Ballack to decide the match.
Germany will face Portugal in the quarter-finals.
A second-half goal from Ivan Klasnic gave Croatia a fully-deserved 1-0 win over Poland in their final Group B game in Klagenfurt Monday to ensure Slaven Bilic's side finish the group phase with a 100-per-cent record.
Klasnic celebrated becoming the first footballer to play in a European Championship finals after undergoing a kidney transplant by calmly slotting home a Danijel Pranjic cross in the 52nd minute.
With Croatia already qualified as group winners, Klasnic was one of nine changes made by coach Slaven Bilic as he rested his first- choice players for Friday's quarter-final clash against Turkey.
Poland needed to beat Croatia to have any chance of qualifying.