In 1150 or 1151 the Almohad caliph Abd al-Mu'min built a new kasbah (citadel) over the site of a former Almoravid ribat on the southwest shore of the Bou Regreg River, within which he included a palace and a mosque.[9][10][11] His successor, Abu Yusuf Ya'qub al-Mansur (ruled 1184–1199), embarked on a huge project to construct a new fortified imperial capital, called al-Mahdiyya or Ribat al-Fath, on the site of what is now the old city of Rabat, with new walls extending over a vast area beyond the old kasbah.[12] This project also included the construction of an enormous mosque (the remains of which include the Hassan Tower) and of new grand gateways including Bab er-Rouah.