Disputedand divided Western Sahara -- where a 29-year ceasefire ended Friday -- is a former Spanish colony mostly under Morocco's control.

An Algerian-backed independence movement -- which holds a fifth of the territory -- has campaigned for a vote on self-determination through decades of war and deadlock.

The ceasefire collapsed after Morocco said Friday that it had sent troops into no man's land to reopen a road to neighbouring Mauritania.

With the pro-independence Polisario Front saying it is returning to war, here is an explainer on the territory.

The north African territory sits on the western edge of the Sahara desert, stretching along about 1,000 kilometres (620 miles) of Atlantic coastline.

At 266,000 square kilometres (103,000 square miles) it is relatively large -- but its inhospitable terrain supports only around half a million people.

With Morocco to the north, Algeria to the east and Mauritania to the south and southeast, it boasts large reserves of phosphate and rich offshore fisheries.

As Spain withdrew in 1975, Morocco moved in, claiming the territory was part of the kingdom.

It was opposed by the Polisario Front, which took up arms to fight for independence.

The dispute was referred to the International Court of Justice in The Hague, which ruled in favour of self-determination.

In November 1975, 350,000 Moroccans took part in the so-called Green March to the border to press the kingdom's claim.

In February 1976, the Polisario Front proclaimed the Sahrawi Arab Democratic Republic (SADR), with the support of allies including Algeria and Cuba.

The Polisario initially gained the upper hand, before being pushed back into the interior.

During the 1980s, Morocco built a series of concentric walls in the desert, most made of sand, to keep Polisario fighters out of territory where it had established control.

The outermost defensive line runs for 2,700 kilometres, ringing the 80 percent of the Western Sahara now under Moroccan control.

(FILES) In this file photo uniformed soldiers of the pro-independence Polisario Front of the disputed Western Sahara stand before a Sahrawi flag flying at the Boujdour refugee camp near the town of Tindouf in Western Algeria; the territory's ceasefire has
(FILES) In this file photo uniformed soldiers of the pro-independence Polisario Front of the disputed Western Sahara stand before a Sahrawi flag flying at the Boujdour refugee camp near the town of Tindouf in Western Algeria; the territory's ceasefire has been broken. RYAD KRAMDI / RYAD KRAMDI

It is fortified with barbed wire and trenches and forms one of the world's largest minefields.

The SADR is a member of the African Union, but controls just 20 percent of the territory, mostly empty desert.

The United Nations has repeatedly failed to find a lasting settlement since it brokered a ceasefire on the line of control in 1991.

The UN deployed its MINURSO mission to monitor the ceasefire, and to organise a referendum on the territory's future status.

The vote was set for 1992 but was aborted when Morocco objected to the proposed electoral register, saying it was biased.

It now refuses to accept any vote in which independence is an option, and says only autonomy is on the table.

The conflict has long poisoned Morocco's relations with neighbouring Algeria.

Their common border has been closed since 1994, and between 100,000 and 200,000 Sahrawi refugees live in camps around the Algerian desert town of Tindouf.

After years of deadlock, former German president and UN special envoy Horst Koehler gets the two sides together in Geneva, along with Algeria and Mauritania.

But two rounds of talks falter in March 2019. Koehler then retires for health reasons and has not been replaced.

In the meantime, some 20 African countries open diplomatic offices in the Moroccan-held cities of Laayoune and Dakhla.

A 2018 UN report on Western Sahara cited accounts of "serious human rights violations" committed by Moroccan police against those pushing for self-determination.

It additionally highlighted concerns over rights abuses in the Tindouf camps run by the Polisario.