 It was built by the Almohad caliph Ya'qub al-Mansur between 1195 and 1199, inserted into the previous walls of the kasbah built by Abd al-Mu'min around 1150.It has both an outer facade (facing southeast towards the city) and an inner facade (facing northeast onto the Street of the Mosque), both richly decorated.The massive gate was largely ceremonial and had little defensive value, given its position already inside the city walls; unlike "Bab er-Rouah", the ornate western gate in Rabat's city walls, built around the same time, it was not flanked by true defensive towers.