Spain substitute Mikel Merino condemned host nation Germany to an agonising Euro 2024 quarter-final exit with the last-gasp winner in a dramatic 2-1 victory in Stuttgart for the three-time European champions.
Merino popped up in the 119th minute to power a header into Germany's net from a lovely cross from Dani Olmo, who had fired Spain ahead on 51 minutes when he slammed a superb Lamine Yamal pass into the net.
Germany dominated the second half and deservedly equalised on 89 minutes when Florian Wirtz tucked the ball in off the post from a Joshua Kimmich header.
The game seemed destined for penalties with chances at both ends, but it was left to Luis de La Fuente's Spain – who had Dani Carvajal sent off in the closing seconds for a second booking – to have the final say to secure a semi-final meeting with France or Portugal.
Meanwhile, Germany are left to reflect on what might have been as they become the first host nation to exit the European Championship at the quarter-final stage.