Chefchaouen in  Morocco is often called the blue city or the blue pearl.
In the north of Morocco, in one of the most beautiful places in the Rif mountains, this city of narrow streets and houses painted white and blue emerges. Indigo stains the streets of the medina of the city of Chefchaouen.
The city was founded in 1471 on the site of a small Berber population. Its original population consisted mainly of exiles from Al-Andalus, both Muslims and Jews, which is why the old part of the city has an appearance very similar to that of the Andalusian towns, with small streets of irregular layout and whitewashed houses.
The city was founded as a small kasbah (fortress) by Moulay Ali ibn Rashid al-Alami, a descendant of Abd as-Salam al-Alami and Idris I, and through them, of the Islamic prophet Muhammad. Al-Alami founded the city to fight the Portuguese invasions of northern Morocco.
Along with the Ghomara tribes of the region, many Moriscos and Jews settled here after the Spanish Reconquista in medieval times.
After eight years of the creation of the Spanish Protectorate in Morocco the Spanish Army could effectively take Chaouen, when General Dámaso Berenguer occupied the city on 14 October 1920.
Following the 1924 retreat of the Spanish army from the city  Chaouen was part of the Republic of the Rif (led by Abd el-Krim el-Khattabi) from 1924 to 1926.
In September 1925, in the middle of the Rif War, a rogue squadron of American volunteer pilots, including veterans of World War I, bombarded civilians in Chaouen.
Colonel Charles Sweeney had proposed the idea to French Prime Minister Paul Painlevé, who «warmly welcomed the Colonel’s request.
After al-Khattabi was defeated with the help of the French, he was deported to Réunion. The Spanish Army retook the city in 1926.
The city’s oldest and historically most important mosque is the Great Mosque located at Place Uta Hammam at the heart of the medina.
On a hill overlooking the town to the east there is also a disaffected mosque built by the Spanish in the 1920s, now a popular lookout point.
Also of great historical and religious importance to the city is the mausoleum dedicated to the patron saint of northern Morocco’s Jebalah region, Moulay Abdessalam Ben Mshish al-Alami. His tomb and the village surrounding it is roughly 50 kilometers northwest of from Chefchaouen on the old road to Larache.

Chefchaouen – or Chaouen, as it is often called by Moroccans – is a popular tourist destination because of its proximity to Tangier and the Spanish enclave of Ceuta.
The beauty of Chefchaouen’s mountainous surroundings are enhanced by the contrast of the brightly painted medina (old town). The main square in the medina is lined with cafes and filled to the brim with locals and tourist mingling easily.
Chefchaouen is a popular shopping destination as well, as it offers many native handicrafts that are not available elsewhere in Morocco, such as wool garments and woven blankets. The goat cheese native to the area is also popular with tourists.