Western Sahara (Arabic: الصحراء الغربية Aṣ-Ṣaḥrā’ al-Gharbīyah, Spanish: Sahara Occidental, Berber: Taneẓroft Tutrimt) is a disputed territory in the Maghreb region of North Africa, bordered by Morocco to the north, Algeria to the extreme northeast, Mauritania to the east and south, and the Atlantic Ocean to the west. Its surface area amounts to 266,000 square kilometres (103,000 sq mi). It is one of the most sparsely populated territories in the world, mainly consisting of desert flatlands. The population is estimated at just over 500,000, of whom nearly 40% live in El Aaiún (also spelled Laâyoune), the largest city in Western Sahara.
Occupied by Spain since the late 19th century, the Western Sahara has been on the United Nations list of non-self-governing territories since 1963 after a Moroccan demand. It is the most populous territory on that list, and by far the largest in area. In 1965, the UN General Assembly adopted its first resolution on Western Sahara, asking Spain to decolonise the territory. One year later, a new resolution was passed by the General Assembly requesting that a referendum be held by Spain on self-determination.
The earliest known inhabitants of the Western Sahara were the Berber people of the Gaetulian tribes. Depending on the century, Roman-era sources describe the area as inhabited by Gaetulian Autololes or the Gaetulian Daradae tribes. Berber heritage is still evident from regional and place-name toponymy, as well as from tribal names.
Other early inhabitants of the Western Sahara may be the Bafour and later the Serer and some Arabian tribes. The Bafour were later replaced or absorbed by Berber-speaking populations which eventually merged in turn with the migrating Beni Hassan Arabian tribe.
The arrival of Islam in the 8th century played a major role in the development of the Maghreb region. Trade developed further, and the territory may have been one of the routes for caravans, especially between Marrakesh and Tombouctou in Mali.
In the 11th century, the Maqil Arabian tribes (fewer than 200 individuals) settled in Morocco (mainly in the Draa valley, between the Melwiya river, Tafilalet and Taourirt). Towards the end of the Almohads' rule, the Beni Hassan tribe (a sub-tribe of the Maqil) were called by the local ruler of the Sous to quell a rebellion, they settled in the Sous Ksours and controlled such cities as Taroudant. During the Merinid rule, the Beni Hassan rebelled but were defeated by the Sultan and escaped beyond the Saguia el-Hamra dry river. The Beni Hassan then were at constant war with the Lamtuna nomadic Berbers of the Sahara. Over roughly five centuries, through a complex process of acculturation and mixing seen elsewhere in the Maghreb and North Africa, some of the indigenous Berber tribes mixed with the Maqil Arabian tribes and formed a culture unique to Morocco and Mauritania.
After an agreement among the European colonial powers at the Berlin Conference in 1884 on the division of spheres of influence in Africa, Spain seized control of The Western Sahara and established it as a Spanish colony. After 1939 and the outbreak of World War II, this area was administered by Spanish Morocco. As a consequence, Ahmed Belbachir Haskouri, the Chief of Cabinet, General Secretary of the Government of Spanish Morocco, cooperated with the Spanish to select governors in that area. The Saharan lords who were already in prominent positions, such as the members of Maa El Ainain family, provided a recommended list of candidates for new governors. Together with the Spanish High Commissioner, Belbachir selected from this list. During the annual celebration of Muhammad's birthday, these lords paid their respects to the caliph to show loyalty to the Moroccan monarchy.
As time went by, Spanish colonial rule began to unravel with the general wave of decolonization after World War II; former North African and sub-Saharan African possessions and protectorates gained independence from European powers. Spanish decolonization proceeded more slowly, but internal political and social pressures for it in mainland Spain built up towards the end of Francisco Franco's rule. There was a global trend towards complete decolonization. Spain began rapidly to divest itself of most of its remaining colonial possessions. By 1974–75 the government issued promises of a referendum on independence in the Western Sahara.
At the same time, Morocco and Mauritania, which had historical and competing claims of sovereignty over the territory, argued that it had been artificially separated from their territories by the European colonial powers. Algeria, which also bordered the territory, viewed their demands with suspicion, as it also had a long-running rivalry with Morocco. After arguing for a process of decolonization to be guided by the United Nations, the Algerian government under Houari Boumédiènne in 1975 committed to assisting the Polisario Front, which opposed both Moroccan and Mauritanian claims and demanded full independence of the Western Sahara.
The UN attempted to settle these disputes through a visiting mission in late 1975, as well as a verdict from the International Court of Justice (ICJ). It acknowledged that Western Sahara had historical links with Morocco and Mauritania, but the population of this territory possessed the right of self-determination. On 6 November 1975 Morocco initiated the Green March into Western Sahara; 350,000 unarmed Moroccans converged on the city of Tarfaya in southern Morocco and waited for a signal from King Hassan II of Morocco to cross the border in a peaceful march. A few days before, on 31 October, Moroccan troops invaded Western Sahara from the northwest.
The major ethnic group of the Western Sahara are the Sahrawis, a nomadic or Bedouin tribal or ethnic group speaking the Hassānīya dialect of Arabic, also spoken in much of Mauritania. They are of mixed Arab-Berber descent, but claim descent from the Beni Hassan, an Arab tribe that have migrated across the desert in the 11th century. Like other Saharan Bedouin and Hassaniya groups, the Sahrawis are mostly Muslims of the Sunni branch and the Maliki fiqh. Local religious custom (Urf) is, like other Saharan groups, heavily influenced by pre-Islamic Berber and African practices, and differs substantially from urban practices.