When Spain relinquished control of the Spanish Sahara in 1975, the territory was divided between Mauritania and Morocco. A populist movement subsequently declared the whole area an independent state. In 1979, Mauritania relinquished its claim to part of the country. The Sahrawi Republic government in exile is now recognized by over 70 countries and the Organization for African Unity. Morocco claims sovereignty over the entire area.
Until 1991 there were no railways. In that year, the Mauritanian mining company SNIM opened a diversion of its main line railway bypassing a tunnel on the original line. About 5km of this diversion lies in Western Sahara.
Flag image from CIA World Factbook