Ghana lose 1-0 to Germany in the final Group D match at the Soccer City Stadium to qualify to the last 16 stage of the competition.
Midfielder Ozil fires a shot from outside the box to snatch the match winner on the hour mark.
Australia beat Serbia 2-1 to finish third behind Ghana with inferior goal difference.