Germany progressed to the Confederations Cup semifinals as Group B winners after a 3-1 victory over Cameroon.
Joachim Low's side needed only a point to be sure of a place in the last four but had some early defending to do as their opponents began positively.
But Germany soon gained the upper hand and should have taken the lead after 23 minutes when Joshua Kimmich headed wide after a fine Marvin Plattenhardt cross had picked him out deep inside the area.
In an opening half of few chances, they were almost made to pay late on when Zambo Anguissa looped an effort towards goal only to see Marc-Andre ter Stegen make a good save.
But Germany broke through after only two minutes of the second half when great skill from Julian Draxler enabled Kerem Demirbay to advance into space and rifle a powerful finish past Fabrice Ondoa from the edge of the box.
Soon after the hour, Cameroon's hopes appeared all but over when -- after a VAR review -- defender Ernest Mabouka was sent off for a high challenge on Emre Can, with the referee having previously booked Sebastien Siani in error.
Within moments of the red card Germany scored the goal that seemed to put the outcome beyond any doubt, Timo Werner diving to head home a Kimmich cross.
But with 12 minutes remaining, flicked a header from Vincent Aboubakar seemed to go through the hands of Ter Stegen to give Cameroon hope -- hope that lasted all of three minutes before the unmarked Werner sidefooted home his second.
download video of Germany VS Cameroon 3-1 confederations cup 2017 goals and highlights below