Bastian Schweinsteiger scored twice as Germany beat Portugal 3-1 to clinch third place in this summer's World Cup.
After a goalless first half, Germany's clinical finishing after the break proved vital as Portugal, for all their possession and pretty build-up play, never looked like scoring until Nuno Gomes' late header.
The hosts started very brightly and created an early chance when Sebastian Kehl's shot was deflected for a corner. Germany thought they should have had a penalty for handball - but the referee waved play on.
When Portugal responded, Pauleta should have scored in the 15th minute when he suddenly found himself completely free - but was unable to beat Oliver Kahn when a goal seemed certain.
Five minutes later Ricardo was forced to tip Kehl's long-range lob over the bar for a corner before Lukas Podolski's fierce free-kick was parried by the Portugal shot-stopper.
Eight minutes before half-time Deco had two corners in quick succession - the first was terrible but the second should have ended up in the net but Simao missed his header when he was completely unmarked in front of goal.
Germany took the lead in the 56th minute when Schweinsteiger cut inside, beat two defenders, before unleashing a shot that left Ricardo grasping at thin air.
Philipp Lahm then thundered a dipping right-footed volley just over the bar before Schweinsteiger drilled a 61st minute free-kick into the danger area and the unfortunate Armando Petit deflected the ball past Ricardo.
With 11 minutes left Schweinsteiger made it 3-0 with another great strike with his right foot although Ricardo should perhaps have done better.
A gallant Portugal side pressed for a late consolation goal and, after Kahn had made another great save from Cristiano Ronaldo's 35-yard swerving free-kick, substitute Figo, playing in his last match before announcing his retirement from international football, sent in a pinpoint cross that Nuno Gomes headed home.
But it was Jurgen Klinsmann's side that deservedly won the game to secure third place in what has been a successful tournament for the hosts.