Germany edged out Austria with a Michael Ballack freekick in their Group B meeting to propel the three-times champions into a quarterfinal meeting with Portugal.
"It was a good freekick. I hit the ball very well," the Germany captain said. "It was an important win."
Ballack said the match had been tough and Germany could expect another challenge with stylish Portugal next in line. "It was a difficult game. It's always difficult in this position," he said. "We have a big target which is to go to the final. I feel we were a bit nervous."
Austria needed to win to keep their participation alive but while they produced an energetic performance, they never showed the quality needed to beat their favoured opponents, although on their last two showings few teams will fear Germany.
In an intriguing contest both Austria coach Josef Hickersberger and his German counterpart Joachim Löw were comically sent off following a furious row with the fourth official.
"I told the referee's assistant that Josef Hickersberger and I wanted quietly to get on with our coaching work in our zone and that's why we were both sent to the stand," Löw said regarding his sending off.
But Löw said he was still happy with the outcome: "I am pleased to garner this important win in a match where we were under enormous pressure."
Germany came flying out of the traps as Austria began somewhat nervously and after four minutes haphazard defending allowed Germany a three-on-one but Lukas Podolski dallied on the ball and the Austria defence got back to clear.
A minute later, though, and Germany striker Mario Gomes was guilty of a shocking miss, spooning a shot from three yards out off his shin and high into the air before Gyorgy Garics got back to head it off the line.
Germany were all over Austria in those early moments and Gomes got clear down the left before shooting straight at Jürgen Macho in Austria's goal. The co-hosts gradually settled and a mixture of bad luck and worse control prevented them from taking the lead.
On 18 minutes Christoph Metzelder was lucky to get away without conceding a penalty after tangling with the easy-to-knock-down Erwin Hoffer in the box. A minute later and Hoffer was put clean through by Martin Harnik but an appalling first touch gave Jens Lehmann the chance to dash out and smother the danger.
Rene Aufhauser then forced Lehmann into a save before Macho tipped a fierce drive from Podolski around the post in an entertaining first period.
Five minutes before the break tempers frayed on the touchline between the rival coaches and the fourth official until referee Manuel Gonzalez of Spain took the draconian measure of sending both coaches to the stands.
Austria had a great chance just after the restart with a two-on-one break but Hoffer, who was more of a hinderance than a help in the most crucial moments, failed to release the nippy Umit Korkmaz and was dispossed by Per Mertesacker.
Germany made them pay dearly on 49 minutes after Andreas Ivanschitz had brought down the marauding Philipp Lahm and Michael Ballack rifled home a bullet free-kick from almost 30 yards that fizzed past Macho into the top corner.
Defender Lahm said the stakes were high and Germany were inclined to be solid rather than spectacular - the goal aside. "When a place in the last eight is at stake you can't gamble everything on one card. We were disciplined and organised - but we can still get better in
every department," he said.
Austria were willing throughout the match, but offered little in terms of quality and Lehmann was rarely tested while at the other end Podolski shot just wide from long range on 54 minutes. The co-hosts threw caution to the wind late on with Ivanschitz bustling through only to be denied by Lahm before Hoffer turned sharply but fired well wide from 12 yards.
And a minute from time Miroslav Klose should have buried the game for Germany but he shot straight at Macho before Torsten Frings and substitute Oliver Neuville both missed chances on the counter-attack.