Germany survived a whirlwind assault by Chile and capitalised on a mistake by the South Americans to claim a 1-0 win in a pulsating, bad-tempered Confederations Cup football final in the Russian city of St Petersburg on Sunday.

Lars Stindl scored the only goal into an empty net in the 20th minute after Chile midfielder Marcelo Diaz gave the ball away on the edge of his own penalty area.

It came completely against the run of play in a first half dominated by Chile, but the more experienced South American champions - facing a youthful, experimental German side - could find no way past a team that is effective on the counterattack.

Chile, playing with their trademark high-octane style and driven forward by another relentless display by Chile midfielder Arturo Vidal, dominated the match but were let down by poor finishing.

Despite dominating for long spells, Chile failed to turn 61 percent possession and 20 shots - compared with the Germans' eight - into goals.

READ MORE: Inside the CONIFA World Cup for unrecognised states

Chile's frustrations were clear in the second half when Vidal squared up to Bayern Munich teammate Joshua Kimmich, who was also shoved by Gary Medel.

There was a controversial incident involving video technology in the second half when Chile defender Gonzalo Jara elbowed Timo Werner by the touchline.

Serbian referee Milorad Mazic initially missed the incident, but was alerted to it by the video assistants and then let Jara off with a yellow card instead of showing a red.

There was late drama deep in stoppage time when Germany goalkeeper Marc-Andre ter Stegen dived to push away an Alexis Sanchez free kick.

With time running out, both Vidal and substitute Angelo Sagal fired over the bar, but the German defence held firm.

The victory was a first Confederations Cup trophy for Germany who next year in Russia will be seeking back-to-back World Cup titles.

The win could be a bad omen for Germany, however, as no team has ever won the football World Cup after lifting the Confederations Cup the year before.

Earlier on Sunday, Portugal come from behind to defeat Mexico 2-1 to earn third place.

READ MORE: Football's road to recognition in war-torn Afghanistan

Russia's capabilities as a host for the World Cup next year became far clearer during the two weeks it hosted eight teams in four cities, as the country overcome concerns about fan behaviour to provide a welcoming environment. It has also proved a useful testing ground for Germany, with manager Joachim Loew able to test the capabilities of the talent at his disposal.

Victory in St Petersburg came two days after Germany beat Spain in the Under-21 European Championship final, signalling a bright future for a country which will return to Russia in a year to defend the World Cup won in Brazil in 2014.

This Confederations Cup might never be defended, with the eighth edition likely to be the last. The competition - featuring the regional champions, World Cup holders and next World Cup hosts - failed to spark much interest outside competing countries.

Qatar, the 2022 World Cup hosts, also cannot stage the Confederations Cup in 2021 because it would have to be played in November or December due to the extreme summer heat and would disrupt a second European club season.