KALININGRAD • Spain coach Fernando Hierro admitted his side were fortunate to top Group B after their 2-2 draw with Morocco and called for defensive improvement.
Substitute Iago Aspas scored in stoppage time to earn Spain a point. The goal was originally ruled out but then awarded after a lengthy Video Assistant Referee review showed the Moroccan defence had played him onside.
Morocco coach Herve Renard noted that Spain took the corner - that led to the cancelling out of Youssef En-Nesyri's towering 81st-minute header - from the wrong side.
And Spain, let off the hook on a couple of occasions when pressed by an aggressive North African side, know they have to do better against Russia in the round of 16.
Khalid Boutaib, who gave Morocco a 14th-minute lead, failed to beat goalkeeper David de Gea after racing into the area unchallenged following a throw-in, while Nordin Amrabat's second-half thunderbolt from 25 metres out came off the bar.
"We were lucky to finish first," Hierro, a former Spain centre-back, said. "Obviously we can improve. Five goals in three matches is not the way forward.
"You cannot hold individuals responsible for letting goals in. Everyone needs to defend as a team and that's our style."
Spain had conceded just three goals in 10 qualifying matches.
Isco, scorer of Spain's first goal, challenged his team-mates to be switched on from the first whistle.
"We went out a little hesitant again. This can't keep happening to us. From now, we must start games as a matter of life or death," said the Real Madrid midfielder.
"We can't keep giving goals away, we have to be focused. We're missing what we know best, which is to control the game, have the ball and not play end-to-end."
AGENCE FRANCE-PRESSE, REUTERS