When the 1884 Berlin Conference convened to lay some ground rules for the partitioning of the African Continent, Morocco was awarded to France and Spain. When the partition materialized, during the signing of the Protectorate in 1912, Morocco lost its independence and sovereignty. This, of course, ushered in an era of total colonization.
Colonization was not a leisurely stroll; far from it, colonial powers met with fierce resistance staged by the Moroccan people in the North and the South. It was only in 1934 that resistance receded. This is what is referred to in the Sahara as “Malga Lehkama,” the total control by each colonial power of the territory devolving to it.
During this period, and in compliance with the terms of the Protectorate Treaty, the two protecting powers, namely France and Spain, were responsible for the territorial integrity of Morocco.
Map of the kingdom of Morocco under the french/spanish protectorate in 1934 (Malga Lehkama) :