Germany booked their place in the Confederations Cup semi-finals with a 3-1 win against 10-man Cameroon on Sunday, but the game was marred by more Video Assistant Replay (VAR) confusion.
Chile’s 1-1 draw against Australia means Germany now top Group B and the world champions will face Mexico in Sochi in the semis on Thursday, avoiding Euro 2016 winners Portugal.
Following a tepid first half, Germany opened the scoring with a moment of magic shortly after the interval, Demirbay completing a finely crafted one-two with Julian Draxler by blasting home.
After a VAR review saw Ernest Mabouka eventually sent off for a high tackle on Emre Can after Sebastien Siani was initially mistakenly dismissed, Germany quickly extended their lead through Werner’s first international goal.
Joshua Kimmich’s right-wing cross bounced before it reached the RB Leipzig striker, but Werner dived to divert a header neatly beyond Cameroon goalkeeper Fabrice Ondoa.
Vincent Aboubakar halved the deficit, but Werner soon slotted in his second of the game, and victory means Germany coach Joachim Low has now won 100 of his 150 matches in charge, with his team unbeaten in their last 13 outings.
Germany only needed a draw to book a place in the semi-finals, but they made a slow start, while Cameroon boss Hugo Broos made a late change to his team, replacing Georges Mandjeck with Arnaud Djoum to name the same side for all three group games.
Can had shaken off an ankle injury to start the match and he had the first effort of note, creating space for himself just outside the box, but bending a shot narrowly wide after 20 minutes.
Germany were finding their rhythm and Kimmich should have converted Marvin Plattenhardt’s fine left-wing cross after finding space six yards out, but he misjudged his header.
The first shot on target arrived in the last minute of the half, when Marc-Andre ter Stegen was alert and acrobatic to tip over Andre-Frank Zambo Anguissa’s effort from Mabouka’s cross.
Germany broke the deadlock just two minutes after the interval, though, with a fine team goal.
Demirbay fed Draxler, the Germany skipper returning the pass with a backheel through the legs of Siani to send Demirbay into space, with the Hoffenheim man hammering a superb strike into the top-right corner.
Aboubakar and substitute Nicolas Ngamaleu shot wide in quick succession around the hour mark as the African champions tried to find a way back into the game.
But their hopes of a comeback were effectively extinguished when Mabouka was eventually dismissed for a dangerous challenge on Can, referee Wilmar Roldan first booking Siani, and then producing a red card for the midfielder before reviewing the footage a second time because of the protests of Cameroon players.
After more farcical scenes involving the new technology, Roldan eventually got the decision right and sent off Mabouka, with Cameroon still reeling from the chaos when Germany scored again moments after the resumption.
Werner stooped to send a diving header past Ondoa from Kimmich’s bouncing centre, but the world champions were pegged back after Ngamaleu’s cross was headed through the hands of Germany goalkeeper Ter Stegen by Aboubakar with 12 minutes to play.
Benjamin Henrichs then set up Werner for his second goal, cutting the ball back for a straightforward finish to make sure of Germany’s win.