The town was founded in 1471 by Moulay Ali Ben Rachid, around a fortress, the Kasbah. The medina grew up around it, with its houses and shops. After the fall of Granada, in 1492, it took in Muslims and Jews driven out of Spain.

Spanish troops occupied Chefchaouen in 1920, lost it during the Rif War and retook it in 1926. The town became part of independent Morocco in 1956. The Jewish community left gradually, mainly for Israel: the last Jewish family is said to have left the town in 1968.
Discover the town with a guide:
Why are the walls blue?
No explanation is universally accepted. Several circulate, and the available sources do not settle the question. Here they are.
Jewish tradition
In Jewish tradition, blue evokes the sky, and so God. The most widespread explanation credits the Jews of Chefchaouen with the custom of painting walls blue, perhaps from the arrival of the refugees from Spain. It remains a hypothesis, with little documentation.
According to another often-repeated account, blue was first limited to the Mellah, the Jewish quarter, and the oldest residents remember a mostly white medina in their youth. Several sources place the spread of blue in the 1930s, without the cause being established.
The colour of water
For some residents, the shades of blue recall the Mediterranean. For others, they evoke the Ras El Ma spring, where the town gets its water, essential in these mountains.
Keeping cool
Some residents say blue keeps houses cooler during the hot months. That was probably not the original intention, but it is a reason to carry on.

Mosquitoes
Another belief holds that blue keeps mosquitoes away, as they would mistake the walls for running water. Nothing proves it.
Tourism
Tourism is probably not the origin of the blue, but it goes a long way to explaining why it spread. Local accounts speak of a painting campaign in the 1970s to attract visitors, although the date is not documented. Once a stop on the road between Fez and Tangier, Chefchaouen now draws visitors from all over the world.
A liking for blue
Ask residents why the town is blue, and some will simply tell you that blue is beautiful and soothing. The colour may have passed from house to house, by imitation, until it covered the medina.

What to see in Chefchaouen
Around the town, you can hike in the mountains or visit the Akchour waterfalls. In town, the main thing is to wander the medina, from blue lane to stairway.
The medina is calmer than those of Marrakech or Fez, and you will find Moroccan crafts there. The small blue-and-white paintings of the town and local life make good souvenirs.
In the Kasbah, with its ochre and brown walls, is the ethnographic museum, also called the Kasbah museum, devoted to the history and culture of the region.




