The Moroccan town famous for its blue-painted old medina in the Rif Mountains is Chefchaouen.
Chefchaouen lies in northwestern Morocco, in the foothills of the Rif range, at roughly 600 metres above sea level. Its historic medina is known for narrow lanes, stairways, and buildings washed in shades of blue and white, earning the town the nickname “the Blue Pearl.”
The settlement was founded in 1471 by Moulay Ali Ben Rachid as a fortified town. Its early purpose included defending the region from Portuguese attacks, while its population grew with Muslim and Jewish refugees arriving from Iberia. The old Kasbah and Uta el-Hammam square remain central landmarks inside the medina.
The reason for the blue colour is not settled. Explanations include spiritual symbolism, practical traditions, and the belief that blue discourages mosquitoes. A common mix-up is assuming every part of the modern town is blue: the celebrated blue streets are concentrated mainly in the historic medina.