in Marrakesh. He also created a vast royal citadel and palace complex in Marrakesh which subsequently remained the seat of government in the city for centuries afterward. This royal district included the Kasbah Mosque (or El-Mansuriyya Mosque) in Marrakesh and was accessed via the monumental gate of Bab Agnaou, both dating from al-Mansur's time. He also embarked on the construction of an even bigger fortified capital in Rabat, where he attempted to build what would have been the world's largest mosque. However, construction on the mosque and on this new citadel stopped after his death. Only the beginnings of the mosque had been completed, including a large part of its massive minaret now known as the Hassan Tower. Some of Rabat's historic gates, most notably Bab er-Rouah, also date from this time, one of Al-Mansur's famous works is the Bimaristan of Marrakesh, the first hospital in Morocco to be ever built, Al-Mansur embellished it with luxurious ornaments and sculptures, it had gardens, water canals attached to it and it was Funded personally by Almohad's government, it is said that Averroes worked there for some time. Philosophy and religion Al-Mansur protected the philosopher Averroes and kept him as a favorite at court. Like many of the Almohad caliphs, Al-Mansur was religiously learned. He favored the Zahirite or literalist school of Muslim jurisprudence per Almohad doctrine and possessed a relatively extensive education in the Muslim prophetic tradition; he even wrote his own book on the recorded statements and actions of the prophet Muhammad. Mansur's Zahirism was clear when he ordered his judges to exercise judgment only according to the Qur'an, said recorded statements and absolute consensus. Mansur's father Abu Yaqub appointed Cordoban polymath Ibn Maḍāʾ as chief judge, and the two of them oversaw the banning of all non-Zahirite religious books during the Almohad reforms; Mansur was not satisfied, and when he inherited the throne he ordered Ibn Maḍāʾ to actually undertake the burning of such books. Death and legacy He died on 23 January 1199 in Marrakech. His victory in Alarcos was remembered for centuries later, when the tide of war turned against the Muslim side. It is recounted by the historian Ibn Abi Zar in his 1326 Rawd al-Qirtas ("History of the Rulers of the Maghreb"). The town of Moulay Yacoub, outside of Fez, Morocco, is named after Al-Mansur, and is best known for its therapeutic hot springs. References 1160s