Chefchaouen was originally known as Chaouen, which means ‘peaks. During the Spanish occupation the town changed to Chaouen, and in 1975 the town was renamed Chefchaouen (Look at the Peaks).
It was founded by Moulay Ali Ben Rachid in 1471 as a military base for the Riffian Berber tribes to plan and carry out attacks on the Portuguese settled in Ceuta.
With the arrival of the Muslim and Jewish refugees from southern Spain, the town expanded in 1494, by building the whitewashed houses, with tiny balconies, tiled roofs and patios, which gave the town its distinctive Spanish look. The pale-blue wash that we see today was first introduced during the 1930s.
The town remained isolated until occupied by Spanish troops in 1920. any Christians entering did so on pain of death.
When the Spanish arrived, they were extremely surprised to hear the inhabitants still speaking medieval Castilian. During the 1920, s, the Spanish were thrown out by Abd Al Krim during the Rif War, however, they soon were to return and remain until Morocco's independence in 1956.