Gareth Southgate's four-match spell as England interim manager came to a dramatic conclusion as Spain scored twice in the dying minutes to snatch a 2-2 draw at Wembley.
It looked as though Southgate's hopes of landing the job on a full-time basis would be given a major boost as the hosts led 2-0 with a minute of normal time remaining in Tuesday's friendly.
But Spain debutant Iago Aspas bent in a superb goal off the inside of the left-hand post and, in the sixth minute of stoppage time, Isco squeezed a shot through the legs of substitute goalkeeper Tom Heaton at his near post.
It was a disappointing end to what amounted to a four-game audition for Southgate, which also featured comfortable World Cup qualifying wins over Malta and Scotland either side of a frustrating 0-0 draw in Slovenia.
England's next assignment is a friendly against Germany in March, by which point Southgate is likely to be confirmed as the man entrusted with guiding the Three Lions through the remainder of their qualification campaign and to the finals in Russia in 2018.
His cause was helped here by Adam Lallana's early penalty - the Liverpool midfielder's third goal in as many England appearances after his first 26 caps yielded none - although he departed the action in the 25th minute with an apparent groin injury.
Jamie Vardy's diving header doubled the lead early in the second period, the striker breaking his 951-minute goal drought for club and country before he and his team-mates celebrated with their own version of the 'mannequin challenge'.
England looked well placed to extend their fine recent run but Aspas and Isco had other ideas as Spain maintained their unbeaten record under new head coach Julen Lopetegui.
Despite his poor form over the past month, Vardy was involved as England took the lead in the ninth minute.
The Leicester City striker ran onto Lallana's superb pass from the right wing and, after his first touch let him down, was felled by Pepe Reina - making his first international appearance since the 2014 World Cup.
Lallana took responsibility for the spot-kick and converted into the top-right corner, although his evening was soon over as he walked off and was replaced by Theo Walcott.
Raheem Sterling's teasing cross was just out of Vardy's reach as England sought a second and it duly arrived three minutes into the second half when the striker threw himself at captain Jordan Henderson's clipped cross and buried his header past a helpless Reina.
Walcott ought to have made it three shortly afterwards but he was denied by a strong hand from Reina, with Henderson firing wide from the follow-up.
Heaton saved awkwardly from David Silva at his near post, before the goalkeeper made more routine stops from Koke and Alvaro Morata.
He could do little about Aspas' goal, however, as England conceded for the first time since their Euro 2016 exit to Iceland and there was worse to come as Isco chested down Dani Carvajal's pass and got the better of Heaton to leave Southgate cursing on the touchline.