Updated December 6, 2022 at 4:00 PM ET
AL RAYYAN, Qatar — The first World Cup held in an Arab nation has produced the Arab world's first quarterfinalist.
Morocco became only the fourth African country to reach the quarterfinals at the biggest soccer tournament in the world by beating Spain 3-0 in a penalty shootout after a 0-0 draw through extra time.
The Moroccans were playing in only their second knockout game at a World Cup, an event which is being held in the Middle East for the first time in its nearly 100-year history.
"We felt the support of our fans, be it in Morocco or any other country in the world," said Morocco goalkeeper Yassine Bounou, who plays for Spanish club Sevilla and saved two of the three penalties he faced in the shootout.
Achraf Hakimi, who was born in Madrid and previously played for Real Madrid, converted the deciding penalty in the shootout. Abdelhamid Sabiri and Hakim Ziyech, who returned to the national team after a dispute with the previous coach, also scored for Morocco.
Morocco has been the biggest surprise of the tournament and will next face either Portugal or Switzerland.
Morocco, which also reached the round of 16 at the 1986 World Cup in Mexico, is also the only team from outside Europe or South America to make it to the last eight in Qatar.
Cameroon, Senegal and Ghana are the only other African nations to reach the World Cup quarterfinals. None of the three advanced to the semifinals.
Morocco and Spain are close neighbors with a complex geopolitical relationship.
Pablo Sarabia, Carlos Soler and Sergio Busquets missed their penalties for Spain, with Sarabia hitting the post.
Sarabia had entered the match in the final minutes of extra time, apparently for the shootout. He replaced Nico Williams, who had also come in as a substitute earlier in the match.
"It's my responsibility," said Spain coach Luis Enrique, who before the match said he had asked his players to practice 1,000 penalty kicks while with their clubs. "I picked the first three penalty-takers, and then they could decide themselves. But the first three were my decision, and I would've done the same thing again. The only thing I wished I could do was to take Bounou out and put another goalkeeper in there."
Spain goalkeeper Unai Simón stopped the penalty by Badr Banoun.
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.
"We were unable to score ... so no matter how much we say that we deserved to win for the chances we created and for playing more in their area, it is not going to change anything," Simón said. "The only thing left for us is to accept that we have been eliminated."
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.
Neither team was able to create many significant scoring chances. Morocco seemed satisfied to keep Spain controlling possession and looked to threaten on counterattacks.
Both teams had a few opportunities in extra time, with Spain closest to scoring with a last attempt by Sarabia that clipped the post.
It was the second last 16 match to go into extra time at this year's World Cup. Croatia beat Japan on penalties Monday.
Copyright 2022 NPR. To see more, visit https://www.npr.org.