SPAIN crashed out of yet another major tournament on penalties thanks to Madrid-born Achraf Hakimi's perfect Panenka.
Pablo Sarabia, Carlos Soler and Sergio Busquets all missed their spot-kicks for the 2010 champions as Morocco made history by reaching the World Cup quarters for the first time.
Luis Enrique’s Spain meanwhile have now been knocked out of the last three international competitions from 12 yards – including the 2018 World Cup and last summer’s Euros.
Moroccan keeper Yassine Bounou was the hero – saving two while the other smacked his left-hand post, and was held aloft by his jubilant team-mates at the end.
And PSG full-back Hakimi then stepped up to score the winner with an outrageous dink down the middle of the goal to leave Unai Simon red-faced.
Unsurprisingly, Enrique made five changes from the 2-1 defeat to Japan, most notably midfielder Marcos Llorente coming in for the injured Cesar Azpilicueta at right-back, despite having Dani Carvajal at his disposal.
READ MORE ON WORLD CUP
A mad Pep Guardiola-style switch if there ever was one.
Yet the madness was quite evidently in the stands, owing solely to the Moroccan fans, who somehow managed to pack out both ends behind the goal.
Boss Hoalid Regragui bragged before kick-off that, because they were the last African nation left – as well as being an Arab-speaking country – they could fill out two stadiums with the support they currently have in Qatar.
Based purely on the volume, he had a point.
Most read in Football
HOW TO GET FREE BETS ON THE WORLD CUP
From the get-go, every touch of the ball by a Spanish player in their sky-blue away strip was booed and whistled until a Moroccan briefly disrupted their keep-ball exercise.
That was not often, mind. Enrique hit back at Spanish journalists in the days leading up to this one, claiming he would not alter his Tika-Taka style regardless of the opponent, regardless of the situation. Not even in the face of defeat.
Spain had completed 2,489 group stage passes – their most at a World Cup since records began.
It was the same here with more than 1,000 tonight - 206 for Rodri alone - not that Enrique would be best pleased with his side’s final ball, much like their failure to break down the Japanese last week.
Instead, it was Morocco who went close as Hakimi whipped a free-kick just over.
Just like he promised, Regragui’s underdogs were coming out swinging, their aggression making life uncomfortable for Spain, desperately trying to find their rhythm.
They were almost gifted the lead when Morocco began to feel a bit too comfortable themselves, Yassine Bounou’s pass out intercepted before an offside Marco Asensio smacked the bar.
Morocco regained composure just before the break as Sofiane Boufal ducked and pivoted to pick out a cross for an unmarked Nayef Aguerd. The West Ham defender’s header looped over.
Spain persisted in the second half with their death-by-a-literal-thousand passes approach, something the Moroccans were countering by kicking any shin they could see.
Teenage midfield sensation Gavi – the youngest player to start a World Cup knock-out stage since Pele in the 1958 final – spent more time on the ground than he did on his feet.
He was soon taken off along with Asensio for Carlos Soler and Alvaro Morata.
Chelsea flop Morata was looking to become the first Spaniard to score in four consecutive games at a World Cup since David Villa during their charge to the title in 2010.
Other than a harried effort across goal and a ballooned header, his introduction had little impact.
Plan A was not working. Plan B or C was nowhere to be seen.
It almost backfired with five minutes left as Hakimi’s cross fell to substitute Walid Cheddira only to be crowded out in the box.
The first time Spain lumped it in the box, late in injury time, they almost got the opener but for a decent stop by Bounou to deny Dani Olmo’s free-kick.
Morocco showed more intent in extra-time – Cheddira being put through twice only to be denied by Aymeric Laporte and then Unai Simon.
Had they been more clinical, Spain wouldn’t have even made it to penalties.
READ MORE SUN STORIES
Sarabia came closest in the third minute of extra-time injury time but his side-footed volley from an angle shaved the outside of the far post.
His next touch was his failed spot-kick as things unravelled for the winners of 12 years ago.