A bit of the history of Chefchaouen (the blue town) The city of Chefchaouen was founded in 1471 by Mulay Alí Ben Rachid. Located in an enclave of difficult access it dominated the mercantile route between Tetuan and Fez and served as a base to stop the entry and influence of the Portuguese from Ceuta. During the 15th and 17th centuries the city prospered and grew considerably with the arrival of the Moors and Sephardim expelled from Spain. Until today, the Andalusian neighborhood is one of the most popular in the medina. The Kasbah was built by Mulay Ali Ben Rachid and later restored by Mulay Ismail at the end of the 17th century to defend the city first from the Portuguese, then from the rebellious Berber tribes and later from the Spanish. The city was closed to all foreigners, especially Christians, until practically the beginning of the Spanish occupation in 1920. However, at the end of the 19th century the first travelers arrived: the French explorer Charles Foucauld, disguised as a rabbi, the English journalist Walter Harris from Riff, and William Summers, an American missionary, who died there by poison. Between 1924 and 1926, during the Rif war, Abd-el Krim managed to expel the Spanish, but they did not take long to occupy Chaouen again in September 1926, this time to stay until Moroccan independence in 1956.