The Kasbah Mosque overlooks Place Moulay Yazid in the Kasbah district of Marrakesh, close to the El Badi Palace. It was built by the Almohad caliph Yaqub al-Mansour in the late 12th century to serve as the main mosque of the Kasbah (citadel) where he and his high officials resided.[76] It features a unique floor plan and courtyard layout that sets it apart from other classic Moroccan mosques.