Substitute Niclas Fullkrug's close range strike late in the second half rescued Germany a valuable 1-1 draw against Spain in a FIFA World Cup Group E showdown on Sunday, a result which left the group still wide open.
Alvaro Morata beat his marker and flicked the ball in at the near post past goalkeeper Manuel Neuer following a low cross from Jordi Alba in the 62nd minute to give Spain the lead.
But Fullkrug levelled in the 83rd minute, smashing home a loose ball inside the box.
Spain top the standings with four points and now need only a draw in their final Group E game against Japan to progress. A win would send them through to the knockout round in first place.
Germany, who lost 2-1 in their opener against Japan, are bottom of the table on one point.
They need to win against Costa Rica on Thursday and their hopes then depend on Japan losing. If Japan draw it would come down to goal difference or goals scored by Germany and Japan.