On 27 November 1912, amidst the French conquest of Morocco and in the aftermath of the Agadir Crisis, the Treaty Between France and Spain Regarding Morocco was signed by the French Third Republic and the Kingdom of Spain.
According to the treaty, parts of Morocco would become a Spanish protectorate from 1912 to 1956, when the country regained its independence.
(Dates in italics indicate de facto continuation of office)