Sami Khedira scored late in the 82nd minute to give Germany a 3-2 victory over Uruguay and third place for the second straight World Cup.
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.
Uruguay came from behind to lead 2-1 when striker Diego 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 misjudged a cross.
Thomas Mueller opened the scoring for Germany in the 18th minute, also his fifth goal at the World Cup. Edinson Cavani equalized for Uruguay in the 28th when he slid a shot past goalkeeper Hans Joerg Butt.
Spain will play Germany for the championship on Sunday.
Uruguay is a two-time champion and has never played for third place. The Germans finished third as the host country in 2006.
Uruguay: Fernando Muslera, Diego Lugano, Diego Godin, Jorge Fucile, Edinson Cavani, Luis Suarez, Diego Forlan, Diego Perez, Maximiliano Pereira, Egidio Arevalo Rios, Martin Caceres.
Germany: Joerg Butt, Jerome Boateng, Arne Friedrich, Per Mertesacker, Dennis Aogo, Sami Khedira, Bastian Schweinsteiger, Marcell Jansen, Thomas Mueller, Mesut Oezil, Cacau.