(CNN) -- A superb goal from Mesut Ozil on the hour mark saw Germany go through to the last 16 of the World Cup with a 1-0 win over Ghana at Soccer City on Wednesday night.
The victory also secures Germany's passage as Group D winners and they will now play England on Sunday in Bloemfontien for a place in the quarterfinals.
Australia beat Serbia 2-1 in Nelspruit but the effort was in vain as Ghana go through as the second qualifier on goal difference.
They are the first African team into the the knockout stages and will face Group C winners the United States on Saturday in Rustenberg.
Ozil's superb volleyed strike into the roof of the net gave Joachim Loew's men a deserved victory after having the better of the play, but Ghana also chances in Johannesburg.
In the first half, Andre Ayew looked set to score as he burst into the Germany penalty area, but he took one touch too many, then Ozil was one-on-one with Richard Kingson, but was denied.
Germany captain Philipp Lahm knocked an Asamoah Gyan shot off the line as the teams went in scoreless at halftime, but his team were to eventually triumph.
Coach Loew said he had a word with Ozil in the dressing room about his earlier miss and never doubted he would make amends.
"I told him in the half-time break -- you've still got a goal in you," he told AFP.
"This was an incredibly intense game and not many things worked out for us. But ultimately we have now reached the next stage.
"The round of 16 game (against England) will be a class encounter, we are looking forward to it."
Australia 2-1 Serbia
Serbia only needed a point in the other match to go through, but were undone by a fighting performance by the Socceroos at the Mbombela Stadium.
Two goals in four minutes midway through the second half from Everton midfelder Tim Cahill and substitute Brett Holman gave Australia hope they they could also qualify.
But Serbian substitute Marko Pantelic pulled one back with six minutes left, had another ruled off for offside -- the second of the match for his unfortunatle team -- then shot over the bar with the goal at his mercy.
Serbia also had strong penalty claims denied as Cahill appeared to handle in his own penalty area.
"This was a game of good quality. I cannot reproach any of my players for their effort," Serbian coach Radomir Antic told AFP.
"We had plenty of opportunities but in the end I think that we didn't get fair treatment. We deserved much more than we got. We have to go back home now."
Milos Krasic missed two great scoring chances in the first half and also had an effort ruled out of offside as Serbia dominated, but Australia improved after the break with Cahill outjumping Nemanja Vidic for their opener.
When Holman converted with a long-range strike an unlikely passage to the last 16 looked on the cards, but at the final whistle both teams were disappointed.