Germany has won third place in the World cup with a late game header, beating Uruguay 3-2.

Germany's Sami Khedira scored in the 82nd minute after Uruguay's defense failed to clear a corner from Mesut Oezil.  The goal ended Uruguay's hopes of beating Germany for the first time in 82 years.

Thomas Mueller gave Germany the lead in the 19th minute with his fifth goal of the tournament, but Uruguayan Edinson Cavani equalized the score nine minutes later.

Uruguay took the lead early in the second half with a strike by Diego Forlan, but Marcell Jansen leveled the score for Germany within six minutes.

The championship game will be played Sunday between Spain and The Netherlands.

Some information for this report was provided by AP and Reuters.