Chefchaouen was originally known as Chaouen, meaning ‘peaks’. Under Spanish colonial occupation the spelling changed to Xaouen, and in 1975 the town was renamed Chefchaouen (Look at the Peaks). These days the names are used interchangeably.
Moulay Ali Ben Rachid founded Chaouen in 1471 as a base for Riffian Berber tribes to launch attacks on the Portuguese in Ceuta. The town expanded with the arrival of Muslim and Jewish refugees from Granada in 1494, who built the whitewashed houses, with tiny balconies, tiled roofs and patios (often with a citrus tree in the centre), that give the town its distinctive Spanish flavour. The pale-blue wash prevalent today was introduced in the 1930s – previously windows and doors had been painted a traditional Muslim green.
The town remained isolated and xenophobic – Christians were forbidden to enter on pain of death – until occupied by Spanish troops in 1920. When the Spanish arrived, they were surprised to hear the Jewish inhabitants still speaking a variant of medieval Castilian. The Spanish were briefly thrown out by Abd Al Krim during the Rif War in the 1920s, but they soon returned and remained until independence in 1956.