The edifice was built during the reign of sultan Moulay Ismail in the early 18th century over the ruins of the English "Upper Castle". It was constructed by Pasha Ahmad ben Ali al-Rifi, general of the Jaysh al-Rifi and semi-autonomous governor of Tangiers. Tangiers
