French colonial rule thumb|The Bank al-Maghrib building in central Rabat, completed in 1930 under French colonial rule The French invasion of Morocco began in the east with General Hubert Lyautey's occupation of Oujda in March 1907 and in the west with the Bombardment of Casablanca in August 1907. The Treaty of Fes established the protectorate in March 1912. Acting as French administrator of Morocco, Lyautey decided to relocate the country's capital from Fes to Rabat after the riots of 1912 following the Treaty of Fes. Lyautey appears to have had a personal affinity for Rabat. He argued that its coastal location was more pleasant and more accessible, and that its proximity to Casablanca, which he estimated would become the major economic center, would be advantageous. In 1913, Lyautey hired Henri Prost to design the Ville Nouvelle (Rabat's modern quarter) as an administrative sector, as he did in other major Moroccan cities.
french colonial rule thumb|the bank al-maghrib building in central rabat completed in 1930 under french colonial rule the french invasion of morocco began in the east with general hubert lyautey's occupation of oujda in march 1907 and in the west with the bombardment of casablanca in august 1907 the treaty of fes established the protectorate in march 1912 acting as french administrator of morocco lyautey decided to relocate the country's capital from fes to rabat after the riots of 1912 following the treaty of fes lyautey appears to have had a personal affinity for rabat he argued that its coastal location was more pleasant and more accessible and that its proximity to casablanca which he estimated would become the major economic center would be advantageous in 1913 lyautey hired henri prost to design the ville nouvelle (rabat's modern quarter) as an administrative sector as he did in other major moroccan cities