The French Protectorate of Morocco (; ), 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.