Arabs from Baghdad to Tunis cheered as Morocco became the first Arabic-speaking country to reach the quarter-finals of the World Cup in Qatar, the first to be held in an Arab country.
In Rabat, where fans had crowded cafes for hours beforehand to watch the game, people jammed downtown roads leading to a square where fans had partied after previous Moroccan victories, flags waving from their windows and horns furiously sounding.
"It's the first time I had this feeling!" said Fahd Belbachir, on his way to the city centre. "We're so proud."
Leaders from across the Arab world showered praise on the Moroccan side.
"Congratulations to the Atlas lions, you delighted us. Wow Morocco, you did it again!", Queen Rania of Jordan wrote on Twitter.
In Rabat, Brahim Ait Belkhit said the spontaneous mood of joy was so great that he had patched up a feud with somebody he had avoided for years and then saw in the street. "It made us forget our old quarrel," he said.
Cheers also went up in Tunis, Beirut, Baghdad, Ramallah and other cities as Arabs rejoiced at the largely unexpected win over highly fancied Spain. It echoed the pan-Arab pride that has surfaced during several memorable performances by Arab sides at the Qatar World Cup - a contrast to the political disputes that have long divided Arab states.
Outside the stadium in Doha, where Moroccan fans had appeared to vastly outnumber Spaniards with more than 44,000 people attending, women raised their voices in ululation and men banged drums in a spontaneous dance party.
Hundreds of Moroccan fans had flown into Qatar for the game, joining the large number of resident Moroccans, and there had been some scuffles as people without tickets were unable to enter the stadium.
"I grew up watching big Spanish teams Barcelona and Madrid. So to beat a huge country like Spain is a huge victory for Morocco," said Moroccan national Taha Lahrougui, 23, who lives in Doha.