Morocco annexed the northern two-thirds of Western Sahara (formerly Spanish Sahara) in 1976 and claimed the rest of the territory in 1979, following Mauritania's withdrawal. A guerrilla war with the Polisario Front contesting Morocco's sovereignty ended in a 1991 UN-brokered cease-fire and the nearly 1,700 mile-long defensive sand berm built by the Moroccans from 1980 to 1987 separates the opposing forces with Morocco controlling the roughly 80 percent of the territory west of the berm. A UN-organized referendum on the territory's final status has been repeatedly postponed. The UN since 2007 has sponsored intermittent talks between representatives of the Government of Morocco and the Polisario Front to negotiate the status of Western Sahara. Morocco has put forward an autonomy proposal for the territory, which would allow for some local administration while maintaining Moroccan sovereignty. The Polisario, with Algeria's support, demands a popular referendum that includes the option of independence. Ethnic tensions in Western Sahara occasionally erupt into violence requiring a Moroccan security force response.