Morocco became the first African team to reach the World Cup semi-finals on Saturday night after a pulsating 1-0 victory over Portugal.
Youssef En-Nesyri scored on the stroke of half-time to give Walid Regragui's side the lead.
The expected barrage from Portugal arrived after the pause but the Moroccan defence held firm to add another notable scalp to its basket during a fairy tale run.
They will play defending champions France or England in the semi final at the Al Bayt Stadium on December 14.
Portugal boss Fernando Santos kept faith with Gonçalo Ramos after the 21-year-old's three-goal star turn in the 6-1 annihilation of Switzerland in the last-16.
That meant no place in the starting line-up for record goalscorer Cristiano Ronaldo.
But forewarned about Ramos, Morocco's notoriously mean rearguard swas even more concentrated.
The Benfica striker was unable to roam with the same freedom as he enjoyed during the match against the Swiss.
Not even the introduction of Ronaldo early in the second-half aided Portugal's incisiveness.
“Our players are distressed,” said Santos, who shrugged off questions about his own future.
“Cristiano is a great player and he came on when we thought it was necessary. But no, no regrets."
As Portugal licked their wounds, Moroccans around the globe took to the streets to celebrate the feat.
Written off after being drawn in the same pool as second ranked Belgium and the 2018 runners-up, they topped the group with seven points and accounted for Spain in the last-16 on penalties to become only the fourth team from Africa after Cameroon, Senegal and Ghana to reach the last eight.
"We have gone into the history books,” Regragui beamed. “We have made the continent and our people happy and proud.”
En-Nesyri strikes
The strike for the ages was owed in no small measure to a rush of blood from the Portugal goalkeeper Diogo Costa.
He came to try and collect Yahia Attiyat Allah's cross from the leftt was no surprise when Morocco did forge ahead shortly before the interval.
Portuguese goalkeeper Costa came for a cross from left-back Yahya Attiat-Allah he was never going to get to and Sevilla striker En-Nesyri did the rest with a towering header.
Portugal almost equalised seconds later in spectacular fashion when Bruno Fernandes crashed a bouncing ball from the right-hand side of the box against the crossbar.
Eight minutes of injury time were largely spent with Portugal camped in the Morocco half and Ronaldo almost had his moment when his low strike was kept out by the Morocoo goalkeeper Bounou.
Zakaria Aboukhlal should have ended affairs when clean through but Costa atoned for his earlier error by saving the effort.
But it was to no avail.
"Pinch me, I'm dreaming," said Bounou savouring the history.
“Morocco is ready to face anyone in the world. We have changed the mentality of the generation coming after us. They'll know Moroccan players can create miracles.”