There were also celebrations across the Arab world and in Europe after Morocco beat Portugal 1-0 in Qatar to become the first African or Arab team to reach a World Cup semi-final.
"My heart will stop, what a team, what stamina, what an achievement," Ilham El Idrissi, a 34-year-old Casablanca woman, told AFP.
She was not alone in hailing the team known as the Atlas Lions who will face defending champions France for a place in the final.
"I think I am dreaming awake. Pinch me! What a huge pride. I thank them from the bottom of my heart," said Mouad Khairat, 29, an executive in a call center.
"The Moroccan team has managed to do the impossible. We want the cup now."
The collective celebrations that greeted the final whistle are becoming a habit across the kingdom.
Morocco topped their group, beating Canada and Belgium and then eliminated Spain on penalties in the round of 16 before overcoming Portugal.
"There is no such thing as impossible in soccer, that's the magic of this sport", former Moroccan international Abderrazak Khairi told AFP.
Khairi scored twice in the surprise 3-1 victory over the same opponents, Portugal, in the 1986 World Cup in Mexico, when Morocco became the first African nation to reach the knockout rounds.
No African or Arab country had managed to go beyond the quarter-finals. Cameroon in 1990, Senegal in 2002 and Ghana in 2010 came closest to reaching the final four of the most prestigious tournament.
"The Moroccan team has managed to do the impossible. We want the cup now," said Ali Gyme, 24.
In Casablanca, the temple of Moroccan football, the shirts of the national team and the red flags with the green star, are everywhere in the windows, the stalls, the markets.
Giant frescoes have appeared showing Chelsea attacker Hakim Ziyech and coach Walid Regragui, who has been elevated to the rank of national hero.
Regragui took over the team less than three months before the start of the competition after Vahid Halilhodzic was fired.
Beyond the borders of the kingdom, the Moroccan team has been cheered in the African continent and the Arab world.
After the victory over Spain, broadcaster Al Jazeera spoke of "the wave of euphoria" across the Arab world.
"Cheers rang out from Tunis, Beirut, Baghdad, Ramallah and other cities as Arabs gathered to rejoice in the largely unexpected victory over Spain -- a contrast to the political differences that have long divided Arab nations," the Qatari TV site said.
On Saturday, in East Jerusalem, Ramallah and Gaza, Palestinians celebrated with fireworks, cheers and horns.
In the streets of Morocco, supporters flew the Palestinian flag alongside their own.
In Algeria, despite the tensions with neighboring Morocco, the football site DZfoot applauded the Atlas Lions
"Heroic, sensational. Mabrouk Mabrouk," it said.
'Four best teams'
In Paris, Morocco fans gathered on the Champs Elysees, where the French have celebrated their World Cup triumphs, and exploded with joy at the final whistle.
"It is a great pride for all Arab countries, for all Africa," said Maamar, 27, who waved a Moroccan flag but said he was of Algerian origin.
"Whatever happens we are in the four best teams in the world."
Dounia, a 23-year-old French-Moroccan, said qualification for the semi-finals was simply "great".
"Today is also my birthday, I couldn't have had a better present."
Waving flags of Morocco, Algeria, Syria and Palestine and singing in Arabic, the happy fans mingled with tourists thronging the French capital's iconic avenue on a chilly winter evening.
With France going on to beat England later in the evening, Paris officials said they had deployed "1,220 policemen and gendarmes".
Fans also gathered in Brussels, where 18 people were arrested during incidents after Morocco beat Canada in the group phase.