Despite having collected four points from Croatia and Belgium during the group stages, Morocco were huge underdogs to progress past the 2010 world champions on Tuesday.
However, after a goalless draw was played out at the Education City Stadium, the Atlas Lions held their nerve in a penalty shootout to reach the last eight of the tournament for the first time in their history.
Goalkeeper Yassine Bounou was the star, saving penalties from Carlos Soler and Sergio Busquets after Pablo Sarabia had struck the post with La Roja's first spot kick.
In sharp contrast, Morocco netted three of their four efforts, Achraf Hakimi converting the decisive penalty with an audacious 'Paneka' effort as Unai Simon dived to his right.
Since Regragui became head coach at the end of August, Morocco have recorded four wins and three draws in seven outings, the only effort conceded being an own goal versus Canada in this competition.
As well as their remarkable form at the back, Regragui has paid credit to the spirit of his players, stating that the European-born representatives had proven their Moroccan heritage over the past two weeks.
Speaking to reporters at a press conference, Regragui said: "I fought this a lot of times. Before this World Cup we had a lot of problems about guys born in Morocco and Europe. Sometimes people, including some journalists in this room, said these guys don't love Morocco, why not play with the guys born in Morocco?
"We showed to the world that every Moroccan is Moroccan, when he comes with the national team he wants to die, wants to fight.
"I was born in France but nobody can take my heart from my country. My players give 100 per cent. Some players born in Germany, some in Italy, Spain, the Netherlands, France and every country has a football culture. You make this milkshake with that and get to the quarter-finals."
Morocco will now square off against Portugal, who cantered to a 6-1 triumph over Switzerland later in the day after Cristiano Ronaldo had been left on the substitutes' bench.