Mario Gotze
Mario Goetze of Germany celebrates his goal against Brazil during their friendly match in Stuttgart. REUTERS

A Mario Goetze-inspired Germany claimed an impressive 3-2 victory over Brazil in Stuttgart on Wednesday.

The Borussia Dortmund midfielder scored his team's second goal as Germany registered their first win against the South Americans in 18 years.

Bastian Schweinsteiger opened the scoring from the penalty spot before Gotze put the hosts 2-0 up. Robinho cut the deficit on 72 minutes, also from the penalty spot, before Andre Schurrle restored Germany's two-goal lead.

German coach Joachim Loew could barely contain his delight at the final whistle, after watching his young side claim Germany's fourth win over Brazil in 21 attempts.

"I am thrilled to have so much talent," said Lowe. "All the players must prove themselves. I'm happy if I have 20 top players, it's good to have these young players putting each other under pressure.

"That has been the strength of Spain, with even their top players knowing they have to perform to stay in the team. I am happy to have this level of competition."