Chefchaouen (pronounced [ʃəfʃɑwən]) (Arabic: شفشاون, Spanish: Xauen or Chauen) is a city in northwest Morocco. It is the chief town of the province of the same name.
Chefchaouen is situated in the Rif Mountains, just inland from Tangier and Tetouan. The city was founded in 1471, as a small fortress which still exists to this day, by Moorish exiles from Spain led by Moulay Ali Ben Moussa Ben Rached El Alami to fight the Portuguese invasions of northern Morocco. It was known as one of the main concentrations of Moriscos and Jews who sought refuge in this mountainous city after the Spanish Reconquista in medieval times. In 1920, the Spanish seized Chefchaouen to form part of Spanish Morocco. Spanish troops imprisoned Abd el-Krim in the kasbah in 1926 after defeating him with the help of the French force. Spain returned the city after the independence of Morocco in 1956.