One of the main functions of the International Court of Justice (ICJ) is to provide Advisory Opinions - non-binding legal interpretations admitted by United Nations organs. In the summer of 1975, the court considered two questions regarding the disputed territory of Western Sahara (then Spanish Sahara). In 1969, Spain returned the region of Ifni to Morocco.
Since its access to independence in 1956, Morocco has considered Spanish Sahara to be part of its pre-colonial territory, and Spain had largely decolonized its foreign holdings, including much of Spanish Morocco, but had retained the Spanish Sahara. In 1958, the Moroccan Army of Liberation fought the Spanish forces in the Ifni War. After support from France, Spain regained control of the region but returned the region of Cape Juby to Morocco. Morocco however continued to claim Ifni, Saguia el-Hamra and Rio De Oro and several other regions (Mauritania, western parts of Algeria and northern part of Mali) colonized by France. During the 1960s, Morocco succeeded in getting Spanish Sahara to be listed on the list of territories to be decolonized, and on December 20, 1966, United Nations General Assembly Resolution 2229 called on Spain to hold a referendum on self-determination in the region.
After initially resisting all claims by Morocco and Mauritania (which also started laying claims to parts of the region), Spain announced on August 20, 1974, that a referendum on self-determination would be held in the first six months of 1975 and took a census of the region in order to assess the voting population.
Morocco declared it cannot accept a referendum which would include an option for independence and renewed its demands for the integration of the remaining provinces of Saguia el-Hamra and Rio de Oro to the country's sovereignty. In Mauritania, a smaller movement existed to overtake some amount of the territory, partitioning it with Morocco.