Álvaro Morata struck with only four minutes left as Spain reached the European Under-21 Championship semi-finals with a 1-0 win over Germany in Netanya.
Morata managed to squeeze the ball beyond Germany goalkeeper Bernd Leno as the defending champions claimed their successive 1-0 win following a similar success against Russia in their opening Group B match.
Spain's win ensures they join Netherlands in the last four before the two Group B leaders meet on Wednesday. Germany and Russia - who lost 5-1 with 10 men to the Dutch earlier in the day - are both out of the tournament after back-to-back defeats.
Morata came off the bench to score for the second game in succession after settling the match against Russia. Germany will be hugely disappointed at losing having sweated buckets throughout a humid evening in Israel.
Spain always looked the likelier side with Thiago so unfortunate to see a shot hit the post and spin to safety with Leno beaten on 19 minutes.
Rodrigo then danced past Leno, but the finish was not there as he knocked the shot into the side netting.
Germany's best attempt at goal in the first period came via Christian Clemens on 37 minutes when an effort from distance spun inches wide of David De Gea's goal.
The majority of the most notable moments continued to swirl around the Germany goal with Asier Illarramendi whacking an effort a couple of yards wide on 55 before Leno made three saves in quick succession, saving at the feet of Rodrigo and Berridi Inigo Martinez when Spain looked likelier to score.
But the goal finally came just when Germany looked likely to remain alive in the finals after a 3-2 loss to Netherlands in their opening group match.
MAN OF THE MATCH
Alvaro Morata (Spain) - Made the difference for a second straight game. Spain have been buoyed by the success of the substitute.
GERMANY: Leno 5, Jantschke 6, Thesker 6, Ginter 6, Sorg 6, Rudy 6, Rode 6, Holtby 7, Herrmann 6, Clemens 6, Volland 6. Subs: Rudiger 6, Can 6, Lasogga 6.
SPAIN: De Gea 7, Montoya 7, Bartra 7, Inigo Martínez 7, Moreno 7, Illarramendi 7, Koke 7, Thiago Alcántara 7, Isco 7, Rodrigo 7, Tello 7. Subs: Camacho 6, Morata 8, Muniain 6.