After a goalless draw in Al Rayyan, Morocco's 3-0 penalty shootout victory over Spain means Walid Regragui's side become only the fourth African nation to reach the last eight of a World Cup.

Shootout goals from Abdelhamid Sabiri, Hakim Ziyech and Achraf Hakimi, as well as two Yassine Bounou saves was enough to send the 2010 champions crashing out of the tournament.

It is the second successive World Cup that Spain have lost on penalties in the last 16, losing to hosts Russia in 2018.

Luis Enrique's side dominated possession throughout the game, but could not break down a stubborn Moroccan defence. 

The best open play chance of the game fell in stoppage time of extra time, as substitute Pablo Sarabia grazed the far post with an unmarked volley.

Embed from Getty Images

The win means Morocco will face the winner of tonight's clash between Portugal and Switzerland in the next round. 

  • Story of the Match

Both sides started the game in a 4-3-3 formation. Morocco made one change to the side that beat Canada 2-1, with Selim Amallah replacing Sabiri in the starting 11. 

Spain made five changes from the rotated side that lost 2-1 to Japan on Thursday. Three changes were made to the back four, with Marcos Llorente making his first appearance of this year's World Cup.

Both sides looked to have settled early in the game, resulting in neither giving away early chances. Marco Asensio's 26th minute shot was the first real chance of the game as the Real Madrid man hit the side netting.

Morocco sat deep for the majority of the game, looking to negate Spain's quality when in possession and catch their opponents on the break.

The North African side had their first opportunity just before half time, with West Ham defender Naif Aguerd heading over from eight yards out. 

Spanish frustration began to set in after the break. Dani Olmo had Spain's only effort from range in the match, as his fierce free kick forced goalkeeper Bounou to punch clear.

The introduction of youngster Nico Williams added a new dimension to Spain's passive play. The Bilbao man had the better of fullback Noussair Mazraoui on a number of occasions. 

Embed from Getty Images

20-year-old Williams began to create chances by picking gaps in the Moroccan back line. Both Olmo and Alvaro Morata failed to capitalise on late opportunities created by the winger.

As Spain pushed men forwards, Morocco sat deeper, soaking up any pressure. Olmo's dipping effort at goal was pushed away by Bounou in the final act before extra time.

Moroccan substitute Walid Cheddira was the recipient of two golden opportunities in extra time.

Five minutes after the restart, the striker found himself through on goal, but his uncertainty allowed Aymeric Laporte to recover and deny him an effort at goal.

The striker had an even better chance 10 minutes later, holding off Alex Balde to get a shot on goal, only to be denied by the outstretched left leg of Unai Simon

The second half of extra time saw Morocco pinned into their own defensive third, as both Spanish centre halves played possession football inside the Moroccan half.

Regragui's men stood firm, starving Spain of any significant chances and seemingly taking the game to penalties.

With the final attack of the game, Carlos Soler's cross found an unmarked Sarabia at the far post. The 30-year-old's side footed volley flew across the face of Bounou's goal, glancing the far post in the 123rd minute and sending the game to penalties.

Sarabia's luck would not improve. After Sabiri scored Morocco's first penalty, the Paris Saint-Germain winger would strike the post, handing Morocco an early advantage.

Chelsea's Hakim Ziyech doubled his side's lead before Bounou made his first save, denying substitute Soler with a smart stop. 

Embed from Getty Images

Spain looked to have a glimmer of hope when Simon denied Badr Benoun, only for Bounou to palm away Sergio Busquets' follow up effort.

With Morocco 2-0 ahead, a goal from Hakimi would seal their spot in the quarter-final. The fullback calmly chipped his penalty down the middle of the goal as Simon dived out of the way.

Chaos ensued in the Education City Stadium as Moroccan players and fans celebrated their first ever win in a World Cup knockout match.

Morocco now have four days to rest before their next game.

  • Player of the Match

Romain Saiss, Sofyan Amrabat and Aguerd all put in sensational defensive performances for the Atlas Lions, but player of the match can only be one man.

It is not everyday you save two penalties in a World Cup shootout, making history for your nation in the process. 

Embed from Getty Images

That is exactly what Yassine Bounou did tonight, writing his name into Moroccan footballing history.

The Sevilla man also put in a solid performance in regulation time, denying Spanish attackers on numerous occasions to keep his side in the tie.