In 1907, the French took the murder of Émile Mauchamp in Marrakesh as a pretext to invade Oujda in the east, as they took an uprising against their appropriation of customs revenue in Casablanca as an opportunity to bombard and invade that city in the west. The Agadir Crisis increased tensions among the powerful European countries, and resulted in the Treaty of Fez (signed on 30 March 1912), which made Morocco a protectorate of France. A second treaty signed by the French and Spanish heads of state, Spain was granted a Zone of influence in northern and southern Morocco on 27 November 1912. The northern part became the Spanish protectorate in Morocco, while the southern part was ruled from El Aaiun as a buffer zone between the Spanish Colony of Saguia El Hamra and Morocco. The treaty of Fez triggered the 1912 Fez riots. By the Tangier Protocol signed in December 1923, Tangier received special status and became an international zone, although, during World War II, it was occupied from 1940 to 1945 by Francoist Spain.