West Germany were on the brink of a semi-final berth until Antonio Maceda's 90th-minute goal earned Spain a place in the last four at the holders' expense.
In yet another tight Group 2 fixture, West Germany, who needed only a point to finish second in the section, were unfortunate not to score themselves. As close as they came, though, they looked set to come up short until the final minute, when Maceda headed past German goalkeeper Harald Schumacher.
It could have been so different had West Germany converted any of their earlier openings. Hans-Peter Briegel came close to breaching Luis Arconada's goal but hit the bar with a header, while Andreas Brehme was also denied by the woodwork – this time by a post.
The best chance, though, fell to Spain, Lobo Carrasco's penalty saved by Schumacher after Salva had been brought down by Uli Stielike. That spurned opportunity came just before half-time, and Spain continued to press for the goal they needed thereafter – albeit after Arconada had twice come to their rescue to thwart Klaus Allofs.
Spain mounted one final push in the last half-hour and finally got their just reward in the 90th minute. Juan Antonio Señor crossed from the right and, with Schumacher and his central defenders caught in two minds, Maceda swooped to head in via the goalkeeper's hand. For the masters of the late finish, it was a taste of their own medicine – a bitter pill for the two-time winners to swallow.