Achraf Hakimi made himself a hero with a chipped winning penalty as Morocco stunned Spain in a shootout after a goalless draw to reach the World Cup quarter-finals.
The two teams played out a draw after 120 minutes and Spain failed to convert any of their three penalties - goalkeeper Yaccine Bounou saving two - leaving PSG's Hakimi to win it with a nerveless 'Panenka' to spark jubilant scenes.
The north African side's fans had been making themselves heard all game but the atmosphere in the stands did not match the attritional battle on the pitch.
Spain hogged the ball and Morocco sat back plugging the gaps, with very few clear-cut chances being created.
Luis Enrique's side came closest to breaking the deadlock courtesy of Dani Olmo, who struck an arrowed drive from the angle which Bounou pushed away and the goalkeeper also did brilliantly well to keep out Olmo's dangerous free-kick late on.
Morocco were playing on the counter and should have scored in the opening period but Nayef Aguerd sent his unmarked header over, while their only shot on target came via Noussair Mazraoui's long-range drive which was gathered by Unai Simon.
With the sides not being able to be separated, the game went into extra time and substitute Walid Cheddira had Morocco's best chance, but scuffed his shot straight at Simon from eight yards out.
Spain notched over 1,000 passes in the contest and almost won it in the 123rd minute, but Pablo Sarabia's volley agonisingly flicked the outside of the far post.
Education City Stadium was filled mostly by Morocco fans, who went wild at the final whistle as their side reached the last eight for the first time, where they will face Portugal or Switzerland on Saturday (15:00 GMT).