Sunday, 12 July 2026
Chefchaouen — The Blue Pearl of Morocco
The Blue
Pearl
Chefchaouen was built as a fortress against the Portuguese, expanded by Muslims and Jews expelled from Spain, occupied by the Spanish, and painted blue for reasons nobody can quite agree on. It is the most photographed city in Morocco and one of the least understood.
The name means “look at the horns.” Chefchaouen comes from “Chef” — a derivation of the Arabic word for “to look” — and the Berber term “Echaouen,” meaning “antlers” or “horns,” indicating the mountain peaks. The two peaks of the Rif Mountains that bracket the city from above give Chefchaouen its name and, on clear mornings, its frame: a blue medina nested between two horns of green rock, nothing visible beyond the mountains in any direction. This is not a city that opens onto a plain or a coast. It sits inside the mountains as if placed there deliberately, which, in 1471, it was.
It was founded in 1471 by Moulay Ali Ben Rachid, a distant descendant of the Islamic Prophet Muhammad. The original settlement consisted of just a small fortress, now referred to as Chefchaouen’s Kasbah. The fortress was erected to help defend the area from potential attacks by Portuguese invaders; at the time, Portugal was launching attacks against northern cities and towns in Morocco. The kasbah that Moulay Ali Ben Rachid built still stands at the center of the medina. It houses a museum now. Portuguese prisoners helped build the walls. The tower they worked on is still called the Portuguese Tower. The people who built this city knew exactly who their enemies were and left their names on the stones those enemies were forced to raise.
A Fortress Built
From Exile
Portuguese invasion · The Reconquista · Andalusian refugees
Chefchaouen began as a military calculation. The Portuguese were moving along Morocco’s northern coast — they had taken Ceuta, they had taken Tangier — and Moulay Ali Ben Rachid chose the Rif Mountains as the place to stop them. The city was intended as a fortress from which the Moroccans could fight against their opponents. The Portuguese were attempting to expand their power and gain control of Morocco’s valuable grain, sugar, cattle, fish, hide, and honey commerce and trade. The mountains were the defense. A kasbah in the mountains was the nucleus. Walls with around ten gates enclosed the new settlement. And from the beginning, the indigenous Ghomara Amazigh of the region were part of the fabric of the place, alongside the Andalusian exiles who arrived and brought their architecture, their poetry, and their unresolved grief with them.
The grief matters to understanding the city. Along with the Ghomaras of the region, many Andalusi Muslims, Moriscos and Spanish and Portuguese Jews settled here during and after the Reconquista, when Spanish Christians conquered what remained of al-Andalus, the Muslim-controlled parts of the Iberian Peninsula. These were people who had been expelled from their homes, forced to convert or flee, cut off from a civilization they had spent centuries building. They established their quarters on the rugged slopes of the mountains and built their own residential quarters in the Andalusi architectural style, very similar to the traditional quarters of Granada. Walk through the medina today and you are walking through an Andalusian city built in the Rif Mountains by people who knew they would never go home. The horseshoe arches, the tiled courtyards, the covered alleyways — all of it is Granada rebuilt in Morocco, five centuries ago, by refugees who had no other choice.
Sayyida al-Hurra —
Sovereign of the Western Sea
Queen of Tétouan · ally of Barbarossa · last Islamic queen
The founder’s daughter would become one of the most extraordinary figures in Moroccan history and one of the most overlooked in world history. Sayyida al Hurra was born in Chefchaouen around 1491 to 1495, to a prominent Muslim family of Andalusian nobles, who were expelled to Morocco after the fall of Granada, at the end of the Reconquista. Her parents were Ali ibn Rashid al-Alami, the founder and emir of Chefchaouen, and Lalla Zohra Fernandez from Vejer de la Frontera near Cadiz. She grew up in the mountain city her father had built, educated by the finest scholars in Chefchaouen — mathematics, theology, languages including Spanish and Portuguese — and she never forgot what had been done to her family.
She married the governor of Tétouan and became, effectively, its co-ruler. In 1515 she became the last person in Muslim history to legitimately hold the title “al-Hurra” following the death of her first husband. With the title came independent rule of the city and a decision about what to do with it. She decided to make it a base of operations against the powers that had expelled her family from Spain. She formed an alliance with Hayreddin Barbarossa, the Ottoman corsair who controlled the eastern Mediterranean. Al-Hurra split control over the Mediterranean Sea with her ally Hayreddin Barbarossa, an Ottoman corsair who operated in the east while she operated in the west. For thirty years she commanded the western Mediterranean, raiding Spanish and Portuguese shipping, taking captives, negotiating their release for large sums, and building Tétouan into a wealthy and formidable city-state.
She was well respected by her Christian enemies as a “queen” who had power over the western Mediterranean Sea, and over the release of Portuguese and Spanish captives.
— Wikipedia, citing Spanish historical documents of 1540
She later married the Wattasid Sultan of Fez, a rare instance of a Moroccan ruler marrying a queen rather than the other way around. More precisely: her marriage with him was the only recorded instance of a Moroccan king marrying outside of his capital — because Sayyida al-Hurra refused to leave Tétouan for the ceremony, and the sultan came to her. After she had ruled for 30 years, her son-in-law Muhammad al-Hassan al-Mandri overthrew her in October 1542. She retired to Chefchaouen, from where she dedicated her time to religious work. She had begun in Chefchaouen and she ended in Chefchaouen, having spent the years between ruling the western sea. She died in 1561, at around 70 years old, in the mountain city her father had built.
Why the City
Is Blue
Jewish refugees · Mosquito deterrent · Cooling effect · Nobody knows
The honest answer to why Chefchaouen is blue is that nobody knows for certain. The paint is real — every shade from turquoise to indigo to periwinkle to a washed-out pale sky — and it covers almost every surface in the medina. The tradition began in the 1930s, when Jewish refugees settled in the city after fleeing Spain and later Europe. Beyond that starting point, the explanations multiply and contradict each other, and most contain a fragment of truth alongside a fragment of wishful thinking.
In Jewish beliefs, the colour blue represents the sky, which in turn reminds people of Heaven and God. There is a strong tradition among Jewish communities of painting things blue and using blue dye to colour fabrics, especially prayer mats. The theory holds that Jewish refugees arriving in the 1930s introduced the practice of painting walls blue, and that it spread gradually from the Jewish quarter outward. The Andalusian Jewish community had been here since the 15th century; the 1930s wave fleeing Hitler’s Europe reinforced and expanded it.
There are those who believe that shades of blue adorn the city to help deter mosquitoes. Although mosquitoes generally choose to live near water, they don’t like being in it. It is possible that residents noticed fewer mosquitoes in the Jewish part of town and decided to follow suit to rid their homes of pesky bugs. This is a practical explanation that would have appealed to anyone who had spent a summer night in a Rif Mountain town before the paint went up.
Light colors reflect rather than absorb sunlight, keeping the interior of buildings cooler. In a mountain town that nonetheless gets significant summer heat, painting walls blue and white rather than ochre or terracotta would have a measurable thermal benefit. This explanation requires no religious or cultural motivation — just people trying to stay cool and noticing it worked.
According to one guide, one of the most likely explanations is that locals noticed how the blues attracted both national and international visitors. Seeing the positive economic result, the community invested efforts into keeping the town blue. Whatever original motivation started the tradition, this economic feedback loop is almost certainly what has maintained and deepened it into the totality of blue you see today. The blue sustains itself because the blue brings people.
Four Centuries
Behind the Mountains
Closed to outsiders · Rif War · Spanish protectorate · Independence
For most of its history, Chefchaouen was closed. Non-Muslims were not permitted to enter — a rule enforced by the city’s distance from the coast and the difficulty of the mountain roads as much as by any legal prohibition. A site long closed to non-Muslims, it was occupied in 1920 by the Spanish, who restored it to the Moroccan kingdom in 1956. In those four and a half centuries of relative isolation, the Andalusian culture that the original exiles had planted took root and grew without significant outside disruption. The language spoken in Chefchaouen to this day carries traces of 15th-century Andalusian Arabic. The architecture remained Granadan. The city became, over centuries, a remarkably preserved record of a civilization that had been destroyed elsewhere.
In October 1920, General Dámaso Berenguer occupied the city for the Spanish protectorate in Morocco. Following the Spanish retreat from the city, Chefchaouen was part of the Republic of the Rif led by Abd el-Krim from 1924 to 1926. Abd el-Krim’s Rif War — the uprising of the Rif Amazigh against Spanish and French colonialism, one of the most significant anti-colonial struggles of the early 20th century — drew in Chefchaouen as it drew in every northern Moroccan settlement. In September 1925, in the middle of the Rif War, a rogue squadron of American volunteer pilots, the Lafayette Escadrille, bombarded civilians in the region. This detail is not in most tourist literature about the Blue City. It should be. Morocco gained its independence in 1956, and Chefchaouen was returned along with the rest of the Spanish protectorate zone that year.
ⵣWhat to Do
Once You Stop Taking Photos
Ras el-Maa waterfall · Spanish Mosque · Akchour day trip · Plaza Uta el-Hammam
The Instagram version of Chefchaouen is real. The blue is genuinely that vivid. The stairs are genuinely that photogenic. But the city is also a place people live — population 46,168 in the 2024 census, a functioning medina, a market town for the surrounding Rif communities, a place where people go about their lives in the blue streets largely regardless of the cameras pointed at them. The best version of a visit to Chefchaouen is the one where the photos are incidental to actual presence in the place.
The medina’s center is Plaza Uta el-Hammam, the main square where the Great Mosque and the Kasbah face each other across a space filled with café tables and cats. The Kasbah museum is worth an hour: it contains the history of the city from the founding through the Spanish period, and its interior garden is a calm counterpoint to the busy square outside. From the plaza, the medina fans out in all directions in the covered alleyways and open stairways that make getting lost here a genuine pleasure rather than a frustration. Every wrong turn reveals another shade of blue.
Ras el-Maa waterfall is fifteen minutes’ walk from the medina center — a spring-fed cascade where local women wash laundry in the traditional way and where the water that flows through the city’s history originates. Its luxuriant gardens are watered from a constant mountain spring. The Spanish Mosque, a fifteen-minute uphill walk from the medina through fragrant eucalyptus, offers the best panoramic view of the city — the whole blue medina spread below between its two mountain horns, exactly as the name describes. Go at sunset. Even at night, the city whispers in blue.
Akchour, 30 kilometers east by a paved road, is one of the best day trips in northern Morocco: God’s Bridge, a natural limestone arch above a turquoise river, and the Oued Farda waterfalls, reachable by a canyon walk. It extends the Chefchaouen visit beyond the medina and into the Rif landscape that frames the city from every direction.
1 — Chefchaouen is situated in the mountainous region of northern Morocco between Tétouan and Ouazzane, at about 600 metres above sea level in the foothills of the Ka’ala mountain in the western Rif range. In 2020, it was included as a learning city in the UNESCO Global Network of Learning Cities.
2 — Sayyida al-Hurra’s real name has been lost to history. “Sayyida al-Hurra” is a title meaning “sovereign noble free lady” — the name by which European records knew her because they didn’t know her actual name. She is considered the last woman in Islamic history to rule a territory in her own right, not as regent. A portrait of her hangs in the Kasbah museum in Chefchaouen.
3 — The blue paint is almost universally agreed to have become prevalent in the 1930s, with the arrival of Jewish refugees fleeing Nazi Europe. Whether it was originally introduced by 15th-century Andalusian Jewish settlers or 20th-century arrivals is debated. The current depth and totality of the blue is a 21st-century phenomenon reinforced by tourism.
4 — Abd el-Krim al-Khattabi (1882–1963) led the Republic of the Rif from 1921 to 1926 against Spanish and French colonialism. His defeat of the Spanish at the Battle of Annual (1921) — in which Spain suffered one of the worst colonial defeats in history — made him a celebrated figure across the anti-colonial world. He is considered a founding inspiration of guerrilla warfare doctrine and was admired by Ho Chi Minh, Che Guevara, and others.
5 — Photo credits: Wikimedia Commons, CC-licensed photographs. Hero image and blue doors: individual photographers credited on Wikimedia Commons pages. Kasbah image: Wikimedia Commons.