Four-time champions Germany sensationally crashed out of the World Cup despite a 4-2 victory over Costa Rica in their last Group E match on Thursday, tumbling out at the first hurdle for the second consecutive time.

Germany finished third in the standings, behind Spain on goal difference, with Japan top following the Samurai Blue's 2-1 win over the Spaniards.

The result left Japan facing Croatia in the last 16 while Spain will take on Morocco.