Morocco is hoping its unprecedented World Cup exploits can help it win friends and influence people, especially among an Arab public opposed to its 2020 rapprochement with Israel.
Support for the Atlas Lions surged as they battled their way to the semifinal of the World Cup in Qatar -- the first Arab or African team ever to get so far.
Their popularity on the Arab street was helped by players and supporters brandishing Palestinian flags following Moroccan victories, to be seen by millions of live TV viewers worldwide.
That in turn was a diplomatic coup for Morocco against archrival and neighbor Algeria, which for decades had seen itself as North Africa's main champion of the Palestinian cause.
Just two years ago, Rabat sparked criticism across the Arab world for reestablishing ties with Israel.
But international relations expert Tajeddine Houssaini said the agreement, part of a string of U.S.-mediated normalization deals, "doesn't mean that Morocco has turned its back on the Palestinian cause."
"The national team and the supporters only confirmed that in Qatar," he said, noting that Palestinians had even made up chants glorifying the Moroccan team.
Morocco's diplomatic gains go well beyond the Palestinian cause and the Arab world.
"Morocco's extraordinary run in the World Cup of course burnished the image of the country, which has been using soft power for years to make its mark on the international stage," said sports politics expert Moncef El Yazghi.
The kingdom already had a track record of using "football diplomacy" to boost its ties with African countries, signing at least 30 cooperation deals with other federations, he added.
Morocco's winning streak gathered excited fans from South Africa to Tunisia, where supporters ignored a simmering diplomatic spat with Rabat over the disputed territory of Western Sahara.
Even in rival Algeria, where the issue is even more hotly contested, the public took the Atlas Lions to heart -- though official media outlets kept quiet about the team's achievements.
The squad's unexpected success has "grabbed people's attention," French historian Pierre Vermeren said.
"This has given Morocco a major symbolic victory over Algeria -- but also symbolic, sporting and political revenge against its neighbors," he said, citing wins over nearby Portugal as well as Spain.
Morocco has been dreaming for decades of playing with the big teams, "and now it's become a reality", he added.
Morocco will also be hoping to convert its raised profile into economic gains, especially for tourism.
The sector is one of the country's top employers, but it was battered by the Covid-19 pandemic and the global economic downturn exacerbated by Russia's war in Ukraine. The kingdom has yet to see a return to the 13 million visitors it welcomed in 2019.
Lahcen Zelmat, head of the FNIH national hotels federation, said Morocco had an "excellent opportunity."
The team's successes "have given us great visibility." he said, noting Morocco was "familiar for Western Europeans but not necessarily among Asian or Latin American tourists. Today it's known all around the world, but we will need to work hard to make the most of this unexpected publicity."
While soccer victories temporarily distracted many Moroccans from their economic woes, the party for the Atlas Lions -- who returned home on Tuesday -- will soon be over.
Whether the country's World Cup adventure will have a lasting effect on the country's economy remains to be seen.
In recent days, Morocco's image has somewhat been tarnished as Belgian police investigate allegations the kingdom and Qatar bought influence in the European Parliament.
World Cup Qatar host has denied any wrongdoing, while Morocco has offered no official response.
© Agence France-Presse