Germany have been knocked out of the World Cup, with a win against Costa Rica not enough to secure them a place in the last 16.
Hansi Flick’s side came from behind to beat Costa Rica in their final group game 4-2.
On a thrilling night in Qatar, Japan beat Spain 2-1 in the other group game, meaning Germany’s World Cup journey was over.
It means Japan top Group E, and Spain come second, with Costa Rica also failing to qualify.