 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 medina (old city) of Rabat, with new walls extending over a vast area beyond the old kasbah.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", a major gate in the city's western wall, and what is now called "Bab Udaya" or "Bab al-Kbir", the gate of the Kasbah.After Abu Yusuf Ya'qub's death in 1184 the mosque and the capital remained unfinished and his successors lacked the resources or the will to finish it.