Germany's second successive group stage exit despite their 4-2 victory over Costa Rica on Thursday appears shocking for a country with such a history of World Cup success - but it shouldn't have been.

Germany came to Qatar with a leaky defence that had not kept a clean sheet in a competitive game since the 9-0 victory over Liechtenstein in a World Cup qualifier a year ago.

Since then they have conceded 15 goals in 10 competitive games, while in three friendly matches they conceded one goal against the Netherlands and kept a clean sheet only against Israel and Oman.

Data company Nielsen Gracenote gave them a 41% chance of failing to progress on the back of their recent struggles.

On Thursday their defence was shaky, and a Niklas Sule blunder almost cost them when he attempted to clear an easy cross.

Manuel Neuer was present to save his team mates David Raum and Antonio Rudiger, when he tipped over the bar a shot from Keysher Fuller from close range and preserve the lead Serge Gnabry had given them in the first half with a header.

With coach Hansi Flick realising that they needed to win by a considerable margin if they were to prolong their stay at the World Cup, big gaps started to appear in Germany's defence.

Neuer, however, could do nothing 13 minutes after the restart when Yeltsin Tejeda thundered the ball past him on the rebound after he had first saved a Kendall Waston header.

The second goal was no different. Neuer saved a header from Juan Pablo Vargas but the ball deflected off the German keeper and into the net.

Germany traditionally have always had a focal point striker but since Miroslav Klose and Mario Gomez departed the stage, no one has stepped in to fill the void.

Germany have instead opted to play with false nines instead of clear-cut centre forward and it didn't work in Russia four years ago when they finished bottom of their group.

On that occasion it was the first time that Germany had failed to pass the group stage since 1938 - which was a different format.

What happened in Qatar will not come as a huge surprise to those who had kept a close eye on Germany's build-up. Flick was forced to include inexperienced duo Niklas Fuellkrug, 29, and 18-year-old Youssoufa Moukoko.

Germany created many chances against Japan but lacked accuracy in front of goal, while a late equaliser by Fuellkrug allowed Germany to salvage a point against Spain.

Despite knowing that goal difference could come into the equation in case Japan sprung a surprise against Spain in Thursday's other Group E match, Flick's team selection bewildered some pundits who believed he should have selected the Werder Bremen striker in his starting XI.

Gnabry, Jamal Musiala and Thomas Mueller wasted a number of chances in the first half and after the break Musiala and Rudiger hit the post.

After Fuellkrug's introduction they looked more dangerous as he set up Germany's second goal for Kai Havertz. He then scored the fourth goal himself but the damage had already been done with the defeat to Japan and draw with Spain. (Editing by Pritha Sarkar)