The town grew from its position on trans-Saharan trading routes. It declined with the trade, and, in 1977, was attacked by French troops as a suspected base of the Polisario Front, the national liberation movement fighting for independence for the Western Sahara. Fortifications from the period survive around the town.
