|Oliver Kahn (R) shares a laugh with Portugal's Luis Figo|
Bastian Schweinsteiger enjoyed a night to remember in the hosts' farewell match at these finals, scoring twice in the second half as Germany finished the tournament with the bronze medal - and 14 goals to their name, three more than any other team with just Sunday's Final to play.
Schweinsteiger opened the scoring with a swerving shot from distance after 56 minutes and five minutes later the same player's low free-kick was diverted into his own goal by Portugal's Petit. With 12 minutes remaining Schweinsteiger struck Germany's third goal with a fine effort into the top corner before two Portugal substitutes conjured up a late consolation for Luiz Felipe Scolari's side.
Luis Figo, on his final appearance for his country, sent over a perfectly placed cross for Nuno Gomes to head past Oliver Kahn, denying the German goalkeeper one last clean sheet before he too bowed out of the international arena.
5': The first chance of the game fell to the hosts. Bernd Schneider whipped in a free-kick from the right and it was headed down by Christoph Metzelder into the path of Sebastian Kehl who fired the ball narrowly wide from just inside the area.
8': Schweinsteiger played in Miroslav Klose with a fine through-ball, but the striker hit the side-netting with his right-footed effort.
15': Simao Sabrosa found Pauleta with a fine pass but with only Kahn to beat, the Portugal striker fired the ball straight at the German goalkeeper, back in the side in Stuttgart in the place of Jens Lehmann.
20': Kehl's dipping shot from 20 yards almost caught Ricardo off guard, but the Portuguese No.1 did extremely well to tip the ball over the bar.
25': Podolski, awarded the Gillette Best Young Player award the day before this match, stung the palms of Ricardo with a powerful left-footed drive.
31': Deco was allowed time and space to turn and shoot in the area, but the German defence were thankful to see the ball sail over the top of the bar.
36':Simao was close to steering Deco's corner past Kahn, but the Benfica man missed the ball by a matter of inches and it flew across the face of the goal and to safety.
51': Both sides struggled to create clear-cut chances at the start of the second half. Simao’s free-kick from 25 yards whistled just over the bar, provoking gasps from the Portuguese fans.
56': Schweinsteiger moved inside from the left-hand side and unleashed a right-footed shot from the edge of the area which deceived Ricardo. The ball flew through the keeper's arms to give Germany the lead. (1-0)
60': Klose’s cross from the left picked out Philipp Lahm at the far post and the defender hit a first-time shot which dipped over the bar.
61': Schweinsteiger's low free-kick was deflected into his own net by the unfortunate Petit. (2-0)
63': Meanwhile, at the other end, Kahn pulled off a fine save to turn Deco's goalbound shot around the post for a corner.
78': Figo almost made an immediate impact after taking the field, helping to set up Cristiano
|Germany's Lukas Podolski, left, and Bastian Schweinsteiger jubilate after the medal ceremony|
Ronaldo, who shot straight at Kahn. Play switched to the other end and Schweinsteiger scored a virtual carbon copy of his earlier goal, hitting an unstoppable shot past Ricardo from 25 yards. (3-0)
82': Simao's cross from the left was almost turned into his own net by Metzelder, but the ball somehow the ball stayed out of the net. In the same minute, Ronaldo's swerving free-kick almost deceived Kahn, but the veteran keeper was still able to save despite initially diving the wrong way.
88': Figo delivered a great ball into the box and Nuno Gomes was left with the easiest of chances to nod the ball past Kahn. (3-1)
A great second-half display from Germany as Schweinsteiger breathed life into this encounter and helped the hosts to finish in third place. Portugal were unable to equal their feat of finishing third 40 years ago, but Figo served up a piece of magic on his goodbye appearance, as his inch-perfect cross provided the ammunition for Nuno Gomes' goal.