Extremely brief:
Settled by berbers.
Became more rich due to Islamic expansion into the Maghreb region and being a trade route between Morocco and Mali.
Spain took control of the territory in 1884 (Berlin conference) and established a Spanish colony.
In the late 20th century calls for decolonisation pressured the Spanish government into giving a the WS a referendum.
After this the Moroccans and Mauritanians claimed the territory of Western Sahara (Morocco top 2/3, Mauritania bottom 1/3).
They were resisted by the Polisario Front (the native WS), who have backing and support from Algeria.
In 1979 Mauritania withdrew from Western Sahara due to pressure from the Polisario Front, leaving all of the territory for Morocco to claim.
Morocco sets up a sand wall (seen here: http://imgur.com/54EIzII) to contain the guerrilla fighters and they currently administer all of the area west of the wall but claim all of Western Sahara as its Southern Provinces. According to some sources the wall goes several kilometres into Mauritanian territory.