Western Sahara, a Spanish colony until 1975, is mostly desert but boasts immense phosphate resources and rich Atlantic fishing grounds.
About 80 percent of it is controlled by Morocco and 20 percent by the Algeria-backed Polisario Front which seeks self-determination for the local Sahrawi people.
The conflict has long simmered but its dynamics changed in 2020 when then US president Donald Trump recognized Moroccan sovereignty over Western Sahara in exchange for the kingdom's normalization of relations with Israel.
Emboldened by Washington's backing, Rabat has been playing hardball ever since to persuade other states to follow suit, heightening tensions with Algiers, which has since cut diplomatic relations with Rabat.
"We're seeing a diplomatic war, where both sides are resorting to anything short of open conflict," said Riccardo Fabiani, North Africa project director at think-tank the International Crisis Group.
Last week, Morocco reacted angrily when Tunisia's President Kais Saied greeted Polisario head Brahim Ghali on a red carpet at Tunis airport as he arrived for a Japan-Africa investment summit.
Slamming the act as "hostile" and "unnecessarily provocative", Morocco immediately cancelled its participation in the high-profile conference and withdrew its ambassador for consultations -- prompting Tunisia to respond in kind.
The incident showed that "the Western Sahara conflict is starting to have repercussions beyond bilateral Morocco and Algerian relations," Fabiani said. "From now on Morocco will consider Tunisia as part of the pro-Algerian camp."
Morocco's 2020 deal with Trump also reset Rabat's ties with Israel and opened the door to military cooperation with the Jewish state.
Algeria, which has long supported the Palestinian cause and sees Israeli influence on its doorstep as a threat, cut ties entirely with Morocco the following August, citing "hostile acts" -- including the alleged use of Israeli spyware against its senior officials.
Fabiani said the shifting dynamic had meant "the unfreezing" of the Western Sahara conflict.
On the ground, this has taken the form of repeated clashes since late 2020 between Morocco's military and the Polisario, which had agreed to a ceasefire in 1991.
On the diplomatic front, Rabat's more assertive stance was evident in a year-long diplomatic dispute with Madrid.
In April 2021, Ghali visited Spain to be treated for Covid-19, sparking a row that only ended after Madrid dropped its decades-long stance of neutrality over Western Sahara and backed a Moroccan plan for limited self-rule there.
And last month, Morocco's King Mohammed VI demanded in a speech that his country's other allies "clarify" their positions on the issue, calling it "the prism through which Morocco views its international environment".
But observers say that Morocco is not the only party in the region to be behaving more assertively.
Algeria is Africa's top natural gas exporter with pipelines directly to Europe, and in recent months has hosted a steady stream of top European officials hoping to win favour and new gas contracts.
Algeria, Africa's largest country, has been flush with cash since energy prices soared following Russia's invasion of Ukraine.
"During the last decade, Morocco geared up its diplomacy, especially in Africa, and became more assertive with some EU members," said Dalia Ghanem, a senior analyst at the European Union Institute for Security Studies.
At the same time Algeria, under late president Abdelaziz Bouteflika, "lagged behind," she said. "Now, Algeria wants to get back on the regional arena and be the regional leader in Africa."