Michael Ballack struck a thunderbolt free kick to send an unconvincing Germany through to the Euro 2008 quarter-finals with a 1-0 win over co-hosts Austria on Monday.
Germany, needing to avoid defeat to stay in the tournament, looked nervous in the first half but Ballack's strike from 25 metres at the start of the second changed the game and took them through as Group B runners-up behind Croatia.
They will go on to face Group A winners Portugal in Basel on Thursday.
It was the first time the three-times winners have reached the quarter-finals since last clinching the trophy in 1996 in England and only their second win since then too in the finals.
They started their campaign here by beating Poland 2-0 before losing to Croatia 2-1 on Thursday.
"The team put up a great fight. At the start we should have gone in front and the match would have been easier. The way it worked out we had to fight to the last minute," Ballack said.
"It's our own fault we ended up in this situation due to the Croatia match. It mean we couldn't play relaxed."
Austria, needing a win to stand a chance of going through, gave Germany a few nervous moments, particularly in a first half that ended with the two coaches sent to the stands by the referee after an argument between the two of them at pitchside.
Germany should have given themselves the perfect start, and silenced the majority of the 51,000 home crowd, when Miroslav Klose ran through the Austrian defence on the right of the area and crossed low for Mario Gomez.
The German forward was just a metre out with an open goal but he mishit his shot, the ball flew up high and Gyorgy Garics headed it back off the line.
Austria's game plan focused on hitting Germany on the break and the tactic almost paid off in the 19th minute when Erwin Hoffer was put through on goal, only for his control to let him down, giving Jens Lehmann the chance to gather.
Germany's only other good first-half chance came when Lukas Podolski let fly from the edge of the area and forced a good save from Juergen Macho, at full stretch low to his left.
Ballack's free kick, belted right-footed into the top corner, should have given Germany the chance to pick off Austria on the break but they remained cautious.
Austria, however, were short of ideas themselves and well before the end they were reduced to taking pot shots mainly from outside the area.
More from rediff