The conflict escalated after the withdrawal of Spain from the Spanish Sahara in accordance with the Madrid Accords. Beginning in 1975, the Polisario Front, backed and supported by Algeria, waged a 16-year-long war for independence against Mauritania and Morocco. In February 1976, the Polisario Front declared the establishment of the Sahrawi Arab Democratic Republic, which was not admitted into the United Nations, but won limited recognition by a number of other states. Following the annexation of Western Sahara by Morocco and Mauritania in 1976, and the Polisario Front's declaration of independence, the UN addressed the conflict via a resolution reaffirming the right to self-determination of the Sahrawi people. In 1977, France intervened as the conflict reached its peak intensity. In 1979, Mauritania withdrew from the conflict and territories, leading to a stalemate through most of the 1980s. After several more engagements between 1989 and 1991, a cease-fire agreement was reached between the Polisario Front and the Moroccan government. At the time, most of the Western Sahara territory remained under Moroccan control, while the Polisario controlled some 20% of the territory in its capacity as the Sahrawi Arab Democratic Republic, with additional pockets of control in the Sahrawi refugee camps along the Algerian border. At present, these borders are largely unchanged.