Background The Western Sahara has never been a country in the Western Nationalist sense of the word. Before the camel was introduced in north africa at the beginning of the first millenium AD, life in the Sahara was almost impossible. The camel revolution made this region one of the main routes of transport of the world. Salt and Gold were transported between North Africa and West Africa.
Islam arrived in the 8-th century and was an immediate succes. al-Murabitun, aka the Almoravides, where a group of strict interpretators from this region who ended up controlling all of North Africa.
More recently, Ma-a-Aynayn? started a Jihad against the French in the 1910s. He was finally beaten when he tried to conquer Marrakesh.