Indigo walls. Azure staircases. Heavy cerulean doors set into cobalt archways. After a while, moving through the shifting blues of the medina in Chefchaouen can feel more like swimming in the sea than walking around a mountain town.

But the famous dipped-in-blue look has less to do with the sea than with the sky. The place was given its first colorful coat by the Jews who landed here in the 1930s on the run from Hitler’s growing reach. Their choice of hue came from the Jewish tradition of weaving blue thread into prayer shawls to remind people of the sky, the heavens, and ultimately, God’s power. (A less poetic explanation sometimes tossed around is that it’s to repel mosquitoes by mimicking the look of running water.)

The bulk of the Jewish population left for Israel in 1948. Still, every spring the local government hands out paintbrushes to help keep Chefchaouen’s signature look intact. Adding a fresh wash of color to their homes and alleys are Berbers, Muslims, and the Spanish-speaking descendants of 15th-century exiles from across the Strait of Gibraltar.

Also ever-present are travelers: Hikers who head out into the verdant Rif Mountains, climbing to the two hornlike peaks (chaoua) that gave the town its name. Shoppers haggling over wool and camel-hair rugs dyed with colors extracted from the mountain’s plants and earth. Backpackers drawn by the area’s famed hash. (Duuuude . . . are you seeing this??) And photographers, who find a frame-worthy shot no matter which way they turn.

Getting there: Buses arrive daily from Tangier (the closest hub), but also from Fes, Casablanca, and other major cities.

This appeared in the August/September 2015 issue.

Photo by Peden + Munk.