The clock was showing 94 minutes and 55 seconds when England’s manager-in-waiting was reminded that trying to bring some sense and order to the national team is going to be anything but straightforward. The paradox is this was probably the finest performance of Gareth Southgate’s brief stint in charge, but even on the nights when England play well there is still the capacity for disappointment and what a way to finish 2016, a year they would probably rather forget.

It was certainly an extraordinary finale bearing in mind, with less than two minutes of normal play to go, Adam Lallana’s penalty and Jamie Vardy’s header had left the firm impression of a team who had removed the straightjacket England have worn on many of their assignments this year. Iago Aspas’s 89th-minute goal changed everything. Suddenly it seemed to dawn on Spain they were supposed to be the better team and then, finally, there was the moment when England’s defence was exposed again. Isco, another of Spain’s substitutes, had peeled away from Eric Dier. The shot went through Tom Heaton’s legs and the crowd stared in disbelief. There was barely time to restart the match.

For Southgate, it was a grievous blow even if, ultimately, it will make little difference to his chances of going from caretaker manager to full-time occupant. For long spells, there was the clear sense that Spain were simply going through the motions. Their list of injured included, among others, Diego Costa, Andrés Iniesta, Gerard Piqué and Sergio Ramos. David de Gea had been given the night off and, missing the spine of their team, Spain took an awfully long time to remind Wembley of their lofty reputation. They left it so late, in fact, large parts of the crowd had already headed into the night, satisfied with what they had seen and unaware of the drama that was to follow.

Until those jarring late blows, England had played with a level of authority that was seldom evident in Southgate’s previous three matches. Raheem Sterling could be seen showboating at one point. Lallana’s through ball for the penalty was the game’s outstanding moment – a reminder that there is nothing, in football, more satisfying than the perfect pass – and there were passages when England used the ball as effectively as they had done for a long time. To have done that against a team with Spain’s refinement must be encouraging for Southgate even if the body language of the players at the end was more in keeping with a defeat. “We have a long way to go until we are a top team,” Southgate noted.

The disappointment was exacerbated by the fact Lallana, having started the game so impressively, was injured midway through the first half, but mostly because this was a subdued performance from Spain on a night when they looked ripe to be beaten. There were spells when the visiting team hogged the ball but, at 2-0, with little sign of a recovery, the crowd appeared to have given up on the game as a contest and started going through several Mexican waves, as if they wanted to create their own entertainment.

Jamie Vardy heads home England’s second goal. Photograph: Tom Jenkins for the Guardian

Soon afterwards, Wembley was lit up by thousands of mobile phones being illuminated and held to the skies. England looked in full control, playing with width and penetration, with Vardy, Sterling and Jesse Lingard all troubling their opponents and little to endanger Heaton, the half-time replacement for Joe Hart.

England’s players also looked absolutely committed to the idea of making sure it was obvious they were taking the game seriously. Sometimes they seemed to forget entirely it was a friendly. Vardy’s scything follow-through early on against César Azpilicueta was one example and Sterling was also lucky not to be punished after his studs-up challenge on Aritz Aduriz. Inside the opening half an hour, Wembley had witnessed two tackles considerably worse than anything seen in the England-Scotland World Cup qualifier last Friday.

England had gone ahead after nine minutes when Vardy ran on to the kind of pass from Lallana that would ordinarily be expected from one of Spain’s soft-touch specialists and Pepe Reina brought him down for a clear penalty. Lallana directed it to the left of Spain’s goalkeeper and England seemed to be comfortable three minutes into the second half when Jordan Henderson crossed for Vardy to score with a determined header. Iñigo Martínez had been caught napping, not reacting at all as Vardy threw himself at the ball, and that moment felt like a reflection of the game as a whole to that point.

Yet Southgate felt his team started to tire from the 70-minute mark and, slowly but surely, Spain seemed to recognise that there was a way back into the match. Aspas’s goal was a beauty, a rising, curling left-foot shot that went in off the far post and even before Isco delivered the final blow, another chance fell to the Real Madrid player inside the penalty area. That one deflected wide but Isco found the bottom corner with his next effort and Southgate could be seen screaming his frustration.