Before the advent of colonization, Morocco was fully sovereign, independent, and united. The Sahara was under Moroccan sovereignty meaning that during that era there was no entity in the Sahara that was separate from Morocco.
There is not a single document or item in existence which disproves this historical reality. This fact is all the more evident when one considers that it was the populations of the Sahara which actually founded the Almoravid dynasty, the pre-cursorer to the modern Moroccan state, back in antiquity.
The Sahara issue favors the Algeria-backed polisario separatists over Morocco as the overall soverigns. The dispute broke out in 1976 when the Polisario separatists, which proclaimed the so-called Sahraoui republic on the Algerian territory, laid claims to this former Spanish colony, which Morocco had retrieved a year before under the Madrid Accord with Mauritania and Spain.
With Morocco having recovered is southern provinces, the Polisario found nothing better to do than to park the Sahraoui population in camps set up on Algerian territory, called refugee camps or sometimes referred to under fictitious names such and the camps of Laayoune, Smara, ’Aouserd, or Dakhla.