RIO DE JANEIRO — A world class volley by Mario Goetze in overtime fired Germany to a fourth World Cup crown with a 1-0 victory over Argentina on Sunday, leaving the South Americans and their captain Lionel Messi heartbroken.

The thunderous clash between Germany, Brazil’s 7-1 semifinal conquerors, and its bitter rivals had seemed headed for penalty kicks until Andre Schuerrle escaped down the left after 113 minutes and sent in a cross that substitute Goetze controlled on his chest before slamming the ball past goalkeeper Sergio Romero.

The magical strike meant Germany became the only European team to win the World Cup in the Americas, and left the superlative Messi without the title he so craved to crown his glittering career.

“All of Germany is world champion now,” the winners’ immense goalkeeper Manuel Neuer said. “We’re going to celebrate for at least five weeks now. At some point we’ll stop celebrating but we’ll always keep waking up with a smile.”

It will be a richly deserved smile.

As much as all of Argentina hankered for a triumph on Brazilian soil, Germany was worth its win over a subdued Messi and his teammates who counter-attacked dangerously but lacked their opponents’ more fluid passing moves.

Messi’s poor final was summed up with virtually the last kick of the game when he had a chance to score a sensational equalizer with a free kick 30 meters out.

The world’s best player never troubled the world’s best goalkeeper, however, blasting his effort high and wide and seconds later Germany was champions and Argentina was crushed.

“We gave it all, all our bodies could endure,” Argentina midfielder Javier Mascherano said. “The pain is immense because we wanted to take the cup back to Argentina.

“The pain will last forever.”

Germany’s preparations had been rocked before kickoff when midfielder Sami Khedira, one of the tournament’s best players, pulled a calf muscle in the warm-up.

He was replaced in the starting lineup by Christoph Kramer, who had only made two brief substitute appearances earlier.

But Kramer only lasted 32 minutes, going off after a collision with Ezequiel Garay’s shoulder which left him looking dazed, and Germany had to refigure its side again.

Coach Joachim Loew brought Schuerrle on in an attacking midfield role with Mesut Ozil dropping back into a more defensive, central position.

Despite the upheavals Germany ended the half with 65 percent possession and came close to seeing that domination pay off when Benedikt Hoewedes headed the ball powerfully against a post just before the interval, although a linesman’s flag was up for offside.

Argentina striker Gonzalo Higuain should have done far better before that, though, when he was gifted a chance in the 20th minute following a careless header toward his own goal by Germany midfielder Toni Kroos.

The loose ball went straight to Higuain but, with only keeper Neuer to beat, he dragged his shot embarrassingly wide.

Ten minutes later he swept the ball home after a perfect cross from Ezequiel Lavezzi and went on a long celebratory run thinking he had scored, but he was rightly flagged offside.

Messi, who generally had a subdued game without making much impact with his jinking runs, did have a good chance two minutes after the break when he escaped the shackles of the defenders but his angled shot went narrowly wide of the far post.

As the half progressed there was an air of inevitability that the match would move into overtime, although Kroos could have settled it before then if he had struck an 82nd minute shot with greater accuracy instead of sidefooting the ball wide.

Argentina could have broken the deadlock in the first period of extra time when exhausted defender Mats Hummels allowed Argentina substitute Rodrigo Palacio a chance to score but Neuer came out very fast and the substitute lobbed his effort wide.

The game was finally decided by 22-year-old Goetze’s great strike, a fitting finale with the 171st goal of the tournament that tied the record set in France in 1998.

NOTEBOOK: FIFA awarded Messi the “Golden Ball” as the top player of the World Cup on Sunday. The four-time world player of the year had a quiet game by his standards against Germany but scored four of his team’s six goals in the group stage. He also set up Angel di Maria’s winner in the last 16 against Switzerland and shouldered the burden of slotting home Argentina’s first penalty in their shootout win over the Netherlands in the semifinals.