The French Protectorate of Morocco (Protectorat français au Maroc), also known as French Morocco, was the French military occupation of a large part of Morocco established in the form of a colonial regime imposed by France while preserving the Moroccan royal regime known as the Sherifian Empire under French rule. The protectorate was officially established 30 March 1912, when Sultan Abd al-Hafid signed the Treaty of Fes, though the French military occupation of Morocco had begun with the invasion of Oujda and the bombardment of Casablanca in 1907.
The French Protectorate lasted until the dissolution of the Treaty of Fes on 2 March 1956, with the Franco-Moroccan Joint Declaration. Morocco‘s independence did not mean an end to French presence. France preserved its influence in the country, including a right to station French troops and to have a say in Morocco’s foreign policy. French settlers also maintained their rights and property.
The French Protectorate shared territory with the Spanish protectorate, established and dissolved the same years; its borders consisted of the area of Morocco between the “Corridor of Taza” and the Draa River, including sparse tribal lands, and the official capital was Rabat.