Iago Aspas scored a stoppage-time equaliser – with the aid of VAR – as Spain scraped an unconvincing draw with Morocco to top Group B and secure a last-16 tie against World Cup hosts Russia.
Despite their poor showing Spain have finished a World Cup group stage unbeaten for the first time since 2006.
Youssef En-Nesyri – who plays in Spain for Malaga – looked to have won it for Herve Renard’s side when he powered in a superb header from fellow substitute Faycal Fajr’s corner.
But Aspas flicked in Dani Carvajal’s low cross to make it 2-2, with referee Ravshan Irmatov initially disallowing the goal before overturning the decision.
Spain won the group on goals scored as Portugal were held to a 1-1 draw by Iran – but had a tough night.
A dreadful mix-up between Andres Iniesta and Sergio Ramos had allowed Khalid Boutaib to stride through and give Morocco a surprise 14th-minute lead.
Iniesta made amends five minutes later by helping create a sublime equaliser, exchanging passes with Diego Costa and getting to the byeline before cutting back for Isco to steer high into the net.
But Spain looked wobbly in defence when pressed by a committed, aggressive Morocco side, with Boutaib denied by the legs of David de Gea after Hakim Ziyech’s quick throw sent him clear.
Nordin Amrabat was desperately unlucky not to score in the second half as his searing shot came back off the angle of post and bar with De Gea motionless.
Isco was denied a second goal when his header was diverted wide by Romain Saiss – playing instead of dropped captain Medhi Benatia – before the late drama.
– Spain wobble at the back –
Spain have been hit and miss at this World Cup – perhaps unsurprisingly, given the turbulence surrounding the pre-tournament sacking of coach Julen Lopetegui.
They were excellent in their opening game against Portugal – but had to settle for a 3-3 draw – and poor in their second match against Iran – but won 1-0.
In Kaliningrad, they dominated possession – having more than 75% of the ball – and had 18 shots to Morocco’s six. However, they produced a performance that must still have concerned new coach Fernando Hierro.
The game’s first two goals were the clearest demonstration of Spain’s strange display. Iniesta’s loose return pass to Ramos was down to a lapse in concentration, allowing Morocco to take the lead, but his setting up of Isco’s equaliser was beautifully done.
Spain were defensively off-key whenever under pressure, with Gerard Pique lucky to escape punishment early on for a two-footed lunge towards Boutaib – saved by the fact that he did make contact with the ball – before he avoided sanction for a clear second-half handball on the edge of his own penalty area.
In Pique’s defence, he nearly made amends with a header that veered just wide, from an Isco corner, but they were grateful to Aspas for securing them first place in the group – and ensuring they avoided the dangerous Uruguay in the next round.