Midfielder Bastian Schweinsteiger scored two goals and forced the other as World Cup hosts Germany beat Portugal 3-1 to claim third place on Saturday.
Schweinsteiger fired home his first goal of the competition from long range in the 56th minute to put Germany ahead.
Five minutes later, a Schweinsteiger free kick was deflected into his own net by Portugal midfielder Petit, a halftime substitute.
Schweinsteiger added a third with a similar effort to his first in the 78th minute, the ball flying into the top right corner.
Substitute Luis Figo created Portugal's consolation, crossing perfectly from the right for Nuno Gomes to head home from close range two minutes from time.
Both sides had chances in an evenly balanced first half after Portugal surprisingly left captain Figo out of the starting line-up and Germany made six changes to their team.
Germany midfielder Sebastian Kehl saw his shot deflected narrowly wide in the fifth minute and then produced a 25-metre chip which back-pedalling goalkeeper Ricardo did well to tip over.
Ricardo also turned away a piledriver shot from Lukas Podolski following a free kick.
At the other end, Germany goalkeeper Oliver Kahn, making his first appearance at the World Cup after being relegated to the bench for the serious part of the tournament, denied Pauleta in the 15th minute.
Pauleta was sent clean through by Simao Sabrosa's pass but Kahn rushed out of his goal to block the Portugal striker's side-footed effort.
Pauleta, who has managed only one goal, also wasted an excellent chance in the 53rd minute when he shot weakly at Kahn with Ronaldo free and screaming for the ball to his left.
In the 56th minute, Schweinsteiger broke the deadlock as he skipped past two challenges and scored with a screaming 30-metre shot as the flight of the ball appeared to deceive Ricardo.
Five minutes later, Germany won a free kick on the left and another Schweinsteiger rocket was deflected into the net by the hapless Petit.
Germany striker Miroslav Klose, the tournament's leading scorer with five goals. was substituted in the 71st minute without adding to his tally.
Figo, whose international future is the subject of speculation at the age of 33, came on for Pauleta in the 77th minute.
He had barely come on to the pitch when Schweinsteiger struck again to add further fuel to the German party mood which was barely dampened by Gomes's late diving header.