What you need to know:
In Senegal, Rabat is often accused of abuses against African migrants who travel north through Morocco on the way to Europe. But Senegalese President Macky Sall -- who also heads the African Union -- hailed the team's "historic" qualification for the semi-final.
His country is in diplomatic crisis with Morocco, but that's not stopping Tunisian Wissam Sultani supporting the first ever Arab or African team to reach a football World Cup semi-final.
"There's no politics on the pitch. Supporting an Arab country, whichever one, is a duty when it gets to this stage of a tournament," said Sultani, a 41-year-old greengrocer in Tunis, capital of the North African nation.
"Football brings people together, but politics divides them."
Morocco's "Lions of the Atlas", who beat Portugal on Saturday to reach the final four, will face former colonial power France on Wednesday.
They will have the backing of many fans across Africa and the Arab world.
Three African teams -- Cameroon, Ghana and Senegal -- have made it to the quarter-finals since 1990, but Morocco is the first ever to reach the semis.
Sultani is one of many Tunisians supporting the team -- with little regard for a diplomatic stand-off between their two governments over the disputed Western Sahara territory.
Morocco withdrew its ambassador from Tunis in August after Tunisian President Kais Saied welcomed the head of the Polisario Front, which seeks independence for the Western Sahara.
Morocco, which called Saied's act "hostile", sees the mineral-rich desert region as a sovereign part of its own territory.
"Political problems end when the match starts," said Tunis lemon merchant Hamza Ayari, aged 35. "What's important is to see the Arab team win".
In a nearby Tunis street, a sports shop plays Moroccan folk songs to attract customers, and the red jersey of the Moroccan team is the highlight of the display.
Tunisia's media hailed the Moroccan victory over Portugal in glowing terms.
"The kingdom of courage has struck again by taking Portugal out after Spain," the La Presse newspaper wrote.
'Stand up to France'
Even in the kingdom's arch-rival Algeria -- which failed to qualify for the tournament -- many have celebrated the Moroccan wins.
Official media has remained silent, but the private press has heaped praise on the team.
"The Atlas Lions were able to count on an iron defence to reach the last four. Solidity and efficiency, the ingredients for success," Algeria's Reporters newspaper wrote.
Algiers public servant Salim, 45, said Moroccans and Algerians "ignore political differences" between their governments.
"The Algerians are with the Moroccan team", he said, noting both North African nations were home to the Berber people.
Tunisian sociologist Mohamed Jouili said the support for Morocco across North Africa was partly due to a shared history of French colonialism.
"The countries of this region can't compete with France economically, militarily or geopolitically," Jouili said.
"But they can stand up to France for 90 minutes on a football pitch and even beat it," he said, alluding to Tunisia's victory over France during the group stages.
Arab fans have also thrown their weight behind Morocco as its players have raised the Palestinian flag -- despite Rabat normalising relations with Israel in December 2020.
In Senegal, Rabat is often accused of abuses against African migrants who travel north through Morocco on the way to Europe.
But Senegalese President Macky Sall -- who also heads the African Union -- hailed the team's "historic" qualification for the semi-final.
Civil society figure Alioune Tine also urged Senegalese to support the team and hang out Moroccan flags.
"Bringing the World Cup to Africa is now close to reality," he wrote on Twitter.
In Nigeria, national star Jay-Jay Okacha, who used to play for Paris Saint Germain, said that "the French team are dominated by players who have their roots in Africa, but Africa will be solidly behind Morocco to go past them and get to the World Cup final".
That sentiment reaches even as far as South Africa, which failed to get beyond the group stages when it hosted the tournament in 2010.
"I've become a big supporter of the Lions of the Atlas," said young fan Monthati Molosankwein in Johannesburg.
"Even if they only have a slim chance against the title-holders France, nothing is impossible".