Kerem Demirbay and Timo Werner both scored their first senior international goals as Germany beat 10-man Cameroon 3-1 in Sochi to book their place in the Confederations Cup semifinals.
Hoffenheim midfielder Demirbay marked his full debut by breaking the deadlock early in the second half and RB Leipzig striker Werner's brace sandwiched Vincent Aboubakar's header for Cameroon.
Germany, who beat Austrailia 3-2 in their opening match before drawing with Chile, squandered a host of second-half chances but saw the game out comfortably to finish top of Group B and set up a last-four clash with Mexico on Thursday.
Cameroon were controversially reduced to 10 men just after the hour when defender Ernest Mabouka was shown a straight red card for a high tackle on Emre Can.
FIFA officials will have been alarmed when Colombian referee Wilmar Roldan initially sent off the wrong player, Sebastien Siani, on the advice of the video assistant referee before the decision was quickly corrected.
Cameroon began brightly but failed to threaten Marc-Andre ter Stegen and Germany went closest to breaking the deadlock after a pedestrian opening 21 minutes.
Can's curling shot from outside the penalty area drifted wide and Joshua Kimmich should have given Germany the lead three minutes later but sent his diving header from Marvin Plattenhardt's cross just off target.
Cameroon, who lost to Chile and drew with Australia in their previous group games, squandered most of their possession. Their best first-half chance fell to Andre-Frank Zambo Anguissa, whose side-footed volley following Mabouka's cross was well saved by Ter Stegen just before half-time.
Germany came out for the second half with much more intent and took the lead in the 48th minute when Demirbay carried the ball to the edge of the box following Julian Draxler's neat flick and smashed a right-footed shot into the top corner.
Cameroon goalkeeper Fabrice Ondoa made two excellent saves to deny Germany a second goal soon afterwards, first rushing out to deflect Werner's effort and then diving to his left to keep out Kimmich's low follow-up.
Aboubakar and substitute Moumi Ngamaleu both spurned decent chances as Cameroon tried to respond, but they were dealt a blow when Mabouka saw red for his high tackle in the 64th minute and Werner made them pay two minutes later when he dived to head home Kimmich's cross.
Aboubakar glanced a header straight through Ter Stegen's hands with 12 minutes left, but Werner turned home substitute Benjamin Henrichs' pass inside the area for his second goal in the 81st minute.
Ondoa denied Werner his hat-trick and brilliantly kept out an effort from substitute Amin Younes as Germany threatened to add further goals.