Third-place game: Germany 3, Uruguay 2

Diego Lugano of Uruguay reacts after Sami Khedira scored in the 82d minute to give Germany a 3-2 lead in the third-place game of the World Cup. The Germans then held on, withstanding a last-second free kick by Uruguay star Diego Forlan.

PORT ELIZABETH, South Africa - The ball crashed off the crossbar on the final kick of the match, and Germany escaped with third place at the World Cup.

Sami Khedira scored in the 82d minute to give Germany a 3-2 victory Saturday over Uruguay and third place for the second straight World Cup. But the Germans had to survive a final-second free kick by Uruguay star striker Diego Forlan from just outside the penalty area. The shot ricocheted off the crossbar, and the whistle sounded.

Rain-soaked players shook hands and awaited a medals ceremony that was not nearly what they wanted. The Netherlands and Spain will play for the championship Sunday in Johannesburg.

Khedira's header after the Uruguay defense failed to clear a corner kick by Mesut Oezil ended Uruguay's hopes of beating Germany for the first time in 82 years.

"We had hoped for more, and we did everything for it," Khedira said. ". . . We have a young team and set an exclamation mark here and can reach more."

Uruguay rallied for a 2-1 lead when Forlan brilliantly volleyed in Egidio Arevalo's 51st-minute cross for his fifth goal of the tournament. Germany defender Marcell Jansen tied it five minutes later with a header after goalkeeper Fernando Muslera had misjudged a cross.

In the dying moments, Uruguay had one more opportunity. But Forlan, who has been especially dangerous on free kicks, hit the bar.

"Obviously it's something spectacular to be among the top four," Forlan said. "If someone would've asked us at the beginning, we would've liked it. It's something positive."

Uruguay has beaten Germany only once in 10 matches, in 1928. Germany defeated Uruguay in the third-place match in 1970, the last time Uruguay had reached the semifinals.