Morocco became the first Arab nation in the world cup to advance to the quarterfinals after Hakimi converted the decisive penalty with an audacious Panenka chip, beating Spain 3-0 in a penalty shootout on Tuesday.
Pablo Sarabia, Carlos Soler, and Sergio Busquets missed their penalties for Spain, with Sarabia hitting the post and Morocco goalkeeper Yassine Bounou stopping the other two.
The teams drew 0-0 in regulation and extra time.
Morocco has been the biggest surprise of the tournament and will next face either Portugal or Switzerland.
Morocco is also the only team from outside Europe or South America to make it to the last eight. The team made the round of 16 once before, at the 1986 World Cup in Mexico.
Spain was eliminated by host Russia in a penalty shootout at the 2018 World Cup, and by Italy in the semifinals of last year’s European Championship.
It was the fifth straight time Spain played extra time in a knockout round of a major tournament. The team played 120 minutes against Russia and in all three of its knockout games at Euro 2020.
Moroccan fans significantly outnumbered — and were louder — than the Spaniards at Education City Stadium.
Morocco and Spain are close neighbors with a complex geopolitical relationship.