The boundary starts in the north on the Mediterranean Sea just west of Marsa Ben M'Hidi; it then proceeds overland toward the south via a series of irregular lines, veering slightly to the southeast. Near the Moroccan town of Figuig it veers sharply to the west, proceeding then in a broadly south-westerly direction via a series of straight and irregular lines. Upon reaching the Draa Riverthe border then follows this for some distance, before veering sharply to the south, whereupon a straight north-south line proceeds for 116 km down to the Western Sahara tripoint.
History
occupied much of the northern coastal areas of Algeria in the period 1830-47, which had hitherto been subject to the nominal control of the Ottoman Empire. Morocco initially managed to maintain its independence throughout the 'Scramble for Africa' in the late 19th century, whereby European colonial control was established in the rest of Africa. The border between it and the Ottoman domains to the east had been vague, and Morocco maintained a traditional, though often weakly enforced, claim to large areas of north-west Africa. France sought to rectify this, and as a result a border which delimited from the Mediterranean south to Teniet el-Sassi via the Treaty of Lalla Marnia of 18 March 1845. Protocols confirming this treaty were signed on 20 July 1901 and 20 April 1902, which also extended the frontier south to Figuig, though not in any great detail. The thinly scarcely inhabited areas south of Figuig the border remained undemarcated, subject to vague and ill-defined administrative practices on the ground of uncertain legal standing. In 1912, via the Treaty of Fez, France and Spain partitioned Morocco between them, with the northern littoral becoming Spanish Morocco and the rest French Morocco. Morocco gained full independence in 1956, followed by Algeria in 1962. The uncertainty over much of the border alignment, and Morocco’s claims for a so-called 'Greater Morocco' encompassing much of north-west Africa, led to the Sand War of 1962-3. Various agreements were signed in 1969-70 aiming to provide a peaceful resolution of the dispute, which resulted in the treaty of 15 June 1972 which demarcated for the first time the entire boundary. However relations worsened when Spain announced its intention to pull out of Spanish Sahara in 1975, with Morocco then annexing the northern two-thirds, and later the whole, of the territory. Algeria opposed the annexation and provided shelter for the Polisario Saharawi nationalist militia and Saharawi refugees on its territory. As Algeria slid into civil war in the 1990s, relations once again soured, with Morocco closing the border in 1994. Relations thawed slightly with the advent of peace in Algeria in the early 2000s, though at present the border remains closed.