cavani-mueller-getty-584

Edinson Cavani of Uruguay, left, and Thomas Mueller of Germany scored the first goals for their respective sides in Saturday's roller-coaster match. ((Joern Pollex/Getty Images) )

Sami Khedira scored with a header in the 82nd minute to give Germany a 3-2 victory over Uruguay in the FIFA World Cup third-place match Saturday.

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

Thomas Mueller had put Germany up 1-0 at Port Elizabeth, South Africa, and teammate Marcell Jansen's goal tied the match at 2-2 after Uruguay had gone ahead.

Germany finished with 16 goals in seven tournament games, and Germany coach Joachim Loew, his voice still hoarse from the flu, said his team was going home "with a very good feeling."

Uruguay got goals from Edinson Cavani and Diego Forlan in a match played amid a downpour. Forlan hit the crossbar with a free kick blast on the final play of the match, in stoppage time.

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

Forlan and Mueller each finished with five goals, tying them for the World Cup lead with two players who will compete in Sunday's final, David Villa of Spain and Wesley Sneijder of the Netherlands.

Germany has now finished in the World Cup top three on 11 occasions. Uruguay hasn't finished in the top three since its 1950 championship, placing fourth for a third time.

Miroslav Klose's aching back prevented him from playing for Germany. Klose is left one shy of Ronaldo's World Cup record 15 goals. Klose's replacement was Cacau.

As often happens in third-place matches at the tournament, offensive chances were plentiful.

Arne Freidrich headed a cross off the bar early in the first half for Germany, which would score just a few minutes later.

Bastian Schweinsteiger drilled a shot that Fernando Muslera saved, but the goalie was then at the mercy of Mueller, who was all alone to put the rebound into the net in the 19th minute.

Mueller had missed the semifinal loss to Spain due to a suspension.

Schweinsteiger was culpable on Uruguay's first goal nine minutes later, stripped of the ball by Diego Perez. The turnover set up a chance for Cavani down the left side, and he made no mistake with his low shot on veteran 36-year-old goalkeeper Joerg Butt, who made his first World Cup start in place of Manuel Neuer.

Suarez back after red card

Luis Suarez returned after serving a one-match ban for his infamous goal-line handball against Ghana in the quarter-finals, which earned him a straight red card.

Suarez was sprung on the right side in the 41st minute but shot wide of the left post.

Suarez started the play that put Uruguay ahead early in the second. He passed to Egidio Arevalo Rios on the right side, with Rios sending a pass into the box that Forlan hammered off the turf and past Butt in the 51st minute.

There had been worries Forlan wouldn't play due to a right thigh injury, but he was dangerous most of the match.

The lead lasted about five minutes as Muslera misplayed Jerome Boateng's corner kick. Uruguayan players appeared to have two chances to clear the ball from danger but didn't, allowing substitute Jansen to head the ball for the equalizer.

Each side had chances to go ahead before Khedira broke through. Suarez tested Butt, while Stefan Kiesling —a replacement for Cacau — made a strong bid for Germany.

Loew was forced to make several changes to his team. Defender Philipp Lahm and forward Lukas Podolski were out with the flu, as was backup striker Mario Gomez. Loew also has the flu but was on the bench. Defender Dennis Aogo made his World Cup debut.

"I don't think it's too much vanity to think that if we improve a little we can aspire to certain prominence in future international tournaments," Uruguay coach Oscar Tabarez said.

Tabarez made three changes to the team that lost to the Netherlands in the semifinals, recalling captain Diego Lugano, defender Jorge Fucile and Suarez.

Lugano, recovered from a knee injury, replaced Mauricio Victorino.

Fucile also missed the semifinal match due to suspension. He replaced Alvaro Perreira, while Suarez went in ahead of Walter Gargano.

With files from The Associated Press