Eurosport - Wed, 23 Jun 21:21:00 2010
Mesut Ozil scored the only goal of the game on the hour to ensure a meeting against Fabio Capello's side in Bloemfontein on Sunday.
The Black Stars also reached the last 16, edging out Australia on goal difference, and they will face the United States on Saturday.
Germany, who made a stunning start to the competition with a 4-0 victory over Australia in Durban but then suffered a 1-0 loss to Serbia, needed a win at Soccer City to be certain of a last-16 place and it came via a stunning strike from the Werder Bremen playmaker.
He was afforded enough time to pick his spot and Ozil smashed a 20-yard shot into the top corner past the diving Richard Kingson.
The first-half was an end-to-end affair and there was a real moment of controversy as Philip Lahm stopped Asamoah Gyan's header on the line with what appeared to be a combination of chest and arm.
There were few appeals from the Ghana players towards Brazilian referee Carlos Simon and the incident came moments after Germany had spurned a golden chance to take the lead.
Ozil sprung the offside trap but Black Stars keeper Kingson was off his line to smother the shot with his legs.
Kingson had earlier made another good save at his near post after Jonathan Mensah inadvertently deflected Lukas Podolski's cross towards his goal and the former Wigan keeper was also called into action to save an effort from Cacau before pushing away a Bastian Schweinsteiger free-kick that evaded a posse of players in the penalty box.
At the other end, Schweinsteiger made a vital interception just as Dede Ayew was about to pull the trigger and only a superb clearance from Arne Friedrich prevented Kwadwo Asamoah's cross from the left reaching Gyan.
Ayew then tricked Jerome Boateng but Kevin-Prince Boateng could only make a glancing contact with his head from the cross.
It was the first time brothers had ever been on opposing sides at the World Cup finals. Kevin-Prince, who won junior caps for Germany, facing younger brother Jerome.
Ghana had another great chance after the break when a goal kick down the middle was flicked on but Asamoah failed to make clean contact and was denied by Manuel Neuer.
Ghana made an instant response to Ozil's goal but Prince Tagoe's header at the back post was blocked by Boateng before a wonderful saving tackle from Lahm deflected Ayew's shot over the crossbar.
The game petered out in the closing stages with Ghana knowing that one further Serbia goal in Nelspruit would all but certainly deny Africa a team in the knockout stages.
But that goal never came and they get to face the US in Rustenburg while Germany will face old rivals England a day later.
Ghana v Germany
1st Half Goals 0-0
Shots on Target 3-5
Shots off Target 7-5
Blocked Shots 7-4
Yellow Cards 1-1
Red Cards 0-0
Passing Success 79.2%-83.2%
Tackles Success 75%-89.5%
Territorial Advantage 46.4%-53.6%