The French protectorate in Morocco, also known as French Morocco, was the period of French colonial rule in Morocco between 1912 and 1956. The protectorate was officially established 30 March 1912, when Sultan Abd al-Hafid signed the Treaty of Fez, 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 Fez on 2 March 1956, with the Franco-Moroccan Joint Declaration. Morocco's independence movement, described in Moroccan historiography as the Revolution of the King and the People, restored the exiled Mohammed V but it did not end French presence in Morocco. 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 in the same years; its borders consisted of the area of Morocco between the Corridor of Taza and the Draa River, including sparse tribal lands. The official capital was Rabat. Prelude Despite the weakness of its authority, the 'Alawi dynasty distinguished itself in the eighteenth and nineteenth centuries by maintaining Morocco’s independence while other states in the region succumbed to French or British domination. However, in the latter part of the nineteenth century, Morocco’s weakness and instability invited European intervention to protect threatened investments and to demand economic concessions. This culminated in the signing of the Treaty of Madrid in 1880. The first years of the twentieth century witnessed a rush of diplomatic maneuvering through which the European powers and France, in particular, furthered their interests in North Africa. French activity in Morocco began at the end of the nineteenth century. In 1904 the French government was trying to establish a protectorate over Morocco and had managed to sign two bilateral secret agreements with Britain (8 April 1904, see Entente cordiale) and Spain (7 October 1904), which guaranteed the support of the powers in question in this endeavor. That same year, France sponsored the creation of the Moroccan Debt Administration in Tangier. France and Spain secretly partitioned the territory of the sultanate, with Spain receiving concessions in the far north and south of the country. First Moroccan Crisis: March 1905 – May 1906 The First Moroccan Crisis grew out of the imperial rivalries of the