Japan have emerged winners of group E after they defeated Spain 2-1 to set up a round of 16 clash with Croatia.
Recall that Japan shocked Germany 2-1 in their opening match, so they won the group with six points.
Spain finished second with four points and will confront the Atlas Lions of Morocco in the round of 16.
2014 champions, Germany could not make it to the knockout stage despite their 4-2 victory over Costa Rica, as they ended with four points as Spain but have inferior goals difference.
For the second consecutive World Cup, four time champions, Germany could not go beyond the group stages.