Germany set up a mouthwatering last-16 clash with England as Mesut Ozil's second-half strike proved the difference in a 1-0 victory over Ghana at Soccer City.
The win for Joachim Low's side took them to the top of Group D and means they will face England in Bloemfontein on Sunday afternoon, while Ghana ensured African representation in the knockout phase by edging out Australia on goal difference.
The Black Stars will now take on the United States in Rustenburg.
Germany created the first chance when Brazil-born Cacau, in for the suspended Miroslav Klose, broke through in the third minute but his low shot was easily gathered by Richard Kingson in the Ghana goal.
The German contingent were jeering any touch for Berlin-born Kevin-Prince Boateng, whose tackle on Michael Ballack in the FA Cup final last month ruled the Germany star out of the World Cup. However, the Portsmouth man was able to tune out from it and one incisive ball to Asamoah Gyan should have led to a chance, but the Rennes forward's first touch was poor.
Kingson then had to react quickly at his near post as Anthony Annan deflected a Lukas Podolski cross from the left goalwards in the 10th minute, and at the other end a clever ball from Kwadwo Asamoah played in the advancing Boateng but Bastian Schweinsteiger did enough to cut out his cutback to Gyan.
Ghana were proving more than a match for the Germans and Boateng was just unable to get meaningful contact on an Andre Ayew cross from the right.
Ghana created a golden opening early in the second period as Asamoah burst through, but his weak effort was blocked by the onrushing Manuel Neuer.
It was a costly miss as Thomas Muller found Ozil in space outside the area and he flashed a left-foot shot beyond Kingson on the hour mark to take Germany to the top of the group.
Ghana continued to press without creating too many clear-cut openings and Neuer was given a rare test by an Annan shot, although it appeared with Australia beating Serbia 2-1 both teams were happy enough if the result stood and the last few minutes were played out uneventfully.