The holy city of Chefchaouen, (Chaouen), stands a little high, on the roots of the Rif mountains of Jbel Lalla and Jbel Meggou that forms the Chaouen (horns). Chefchaouen was founded in 1471 by the Idrissid Sharifian prince, Moulay Ali Ben Rachid to prevent the Portuguese and Spanish from moving inland from Sebta, Melilia and Kssar Seghir, where they established themselves. Moulay Ali Ben Rachid built a fortified castle, part of which is still visible till today.

Chefchaouen was populated on the 15th century by the first wave of Andaloucian Muslims who had been driven out of Spain by the Catholic inquisition. The city became a safe lieu of retreat for many Andaloucian refugees, which, for many centuries, was forbidden to Christians. Charles de Foucauld was the first known European who penetrated the holy city in 1883,and where he spent one single night, disguised as a Jew. William Harris visited the surroundings of Chaouen in 1889. William Summers was another Western who challenged with his life the Forbidden City which he, stealthily, penetrated in 1892. He was poisoned by its population.

Chefchaouen produced eminent personalities, among them a lady, the famous Essayida Al Horra. Born in Chefchaouen in 1495, Aïcha Al-Horra Bent Ali Ibn Rachid, penetrated the annals of the Moroccan history, and reached; as no woman has ever reached, since the Islamizing of the Country, the status of authority over the province of Tetouan, with an almost full sovereignty as she did. The princess was brought up in Chefchaouen, according to the Sharif's traditions, and was tutored by the most eminent Sheikhs of the epoch. The city’s vocation of point of resistance did not languish, and Chefchaouen became during the first decade of the 20th century a focal lieu of the Rif’s resistance to the Spanish penetration. Abdelkrim El Khattabi made of the city the capital of his military operations, during his confrontations with the Spanish troops.