Achraf Hakimi struck the decisive penalty to send Spain crashing out and Morocco into the World Cup quarter-finals for the first time, winning 3-0 in a shoot-out on Tuesday after a 0-0 draw.
Spain coach Luis Enrique had claimed his players prepared by taking 1,000 penalties as homework but Pablo Sarabia, Carlos Soler and Sergio Busquets all missed from the spot and Madrid-born Hakimi dinked his home to the delight of Morocco's raucous support.
Walid Regragui's side will face Portugal or Switzerland in what is uncharted territory for them, with their previous best a last-16 exit in 1986.
Spain had been hoping they could repeat their 2010 World Cup triumph after reaching the semi-finals of Euro 2020, where they were also beaten on penalties by Italy.
The teams were closely matched through a nail-biting clash, with Spain having more of the ball but Morocco creating the better openings, few though they were.
Luis Enrique trialled his third right-back of the tournament in Marcos Llorente, and benched the team's top scorer Alvaro Morata for Marco Asensio, after the shock defeat by Japan.
Spain monopolised the ball, with Morocco's fans furiously whistling with their side out of possession.
Morocco, who are the last African and Arab side left standing at the first World Cup held in an Arab country, were intensely backed and their fans greatly outnumbered Spain's.
With La Roja playing in a pale blue second strip, they resembled the away team on hostile territory.
Gavi, who at 18 years and 123 days old became the youngest player to start a World Cup knockout game since Brazil great Pele in 1958, rose to the occasion.
The Barcelona midfield terrier was at his most intense, smashing into challenges left, right and centre, even diving to make one with his head.
Morocco goalkeeper Yassine Bounou tipped a Gavi strike on to the crossbar, though it would have been ruled offside, while Asensio drilled into the side-netting, although Spain created little.
Regragui's side sat deep defensively and threatened on the counter, with Unai Simon beating away a long range effort from Noussair Mazraoui.
- Toothless Spain -
Sofiane Boufal, who bypassed Llorente like sand slipping through the Spaniard's fingers early on, carved the best chance of the half for Nayef Aguerd, who headed inches over.
Bounou pummelled away a Dani Olmo strike from an angle as the tension cranked up after the break.
Luis Enrique raged at Rodri for choosing the wrong option on the ball, and withdrew the dogged and muddied Gavi for Carlos Soler.
He threw Morata on too, giving Spain a focal point up top, but they struggled to supply him as Morocco sat deeper and deeper.
Another substitute, Nico Williams did find the Atletico Madrid striker on one occasion but the angle was too tight and he scraped a shot across the face of goal.
Bounou made a fine save from Olmo's free-kick as it almost snuck all the way through, with Spain finally creating stronger chances as the game frayed in the moments before extra-time.
Morocco responded in the additional period by finding stability and testing Simon, who made a fine save with his legs to deny Walid Cheddira after he broke in down Spain's left flank.
Despite heavy pressure by Spain in the final moments before penalties, they could not trouble the Sevilla goalkeeper again, with Pablo Sarabia clipping the outside of the post, although he might have been offside.
Having been sent on apparently for the shoot-out, Sarabia struck the post again from Spain's first penalty, after Abdelhamid Sabiri had sent Morocco ahead.
Soler and Busquets missed, while Hakim Ziyech scored, before Hakimi netted against his birth country to ignite wild celebrations.






Nishan Velupillay #23 of Australia controls the ball during a training session ahead of FIFA World Cup 2026 at Oakland Roots and Soul Sports Club on June 03, 2026 in Alameda, California.Getty Images
Sarpreet Singh #10 of Team New Zealand shoots against Bradley Locko #15 of Team France during the Men's group A match between New Zealand and France during the Olympic Games Paris 2024 at Stade de Marseille on July 30, 2024 in Marseille, France. Getty Images
Samuel Moutoussamy #8 of DR Congo during a training session ahead of the FIFA World Cup 2026 on June 12, 2026 in Houston, Texas. Getty Images
Tahsin Jamshid #24 of Qatar plays the ball during the second half of the international friendly match between Qatar and El Salvador at BMO Stadium on June 06, 2026 in Los Angeles, California.Getty Images
Niall Mason of Doncaster Rovers during the Sky Bet League Two match between Doncaster Rovers and Exeter City at Keepmoat Stadium on April 29, 2017 in Doncaster, England.Getty Images
Zidane Iqbal of FC Utrecht goes forward during the UEFA Europa League 2025/26 League Phase MD3 match between SC Freiburg and FC Utrecht at Stadion am Wolfswinkel on October 23, 2025 in Freiburg im Breisgau, Germany.Getty Images








