The process culminated in the Berlin Conference of 1884, in which the European nations concerned agreed upon their respective territorial claims and the rules of engagements going forward.
[4] Another Franco-Spanish treaty was signed on 27 November 1912 which created a French protectorate over most of Morocco, whilst ceding parts of the country to Spain viz.
[4][3] The entire French West Africa/French Algeria-Saguia el Hamara/Rio de Oro boundary was confirmed by treaty on 19 December 1956, with France and Spain then demarcating it on the ground in 1957 with several pillars.
An International Court of Justice ruling on the matter in October 1975 stated that neither the Moroccan nor Mauritanian claims to Western Sahara were strong enough to justify annexation, and that the Saharawi people should be allowed to determine their own future.
[7][3] Morocco thereafter sought to settle the matter military, and in November 1975 conducted the 'Green March', in which thousands of soldiers and Moroccan nationalists forcibly crossed the Morocco-Spanish Sahara border.
Polisario forces declared a Sahrawi Arab Democratic Republic based on the boundaries of Spanish Sahara, thus starting a long war against Morocco and Mauritania.