Abu Yusuf Yaqub al - Mansur Abu Yusuf Ya ' qub al - Mansur ( " Abū Yūsuf Ya ‘ qūb al - Manṣūr " ) ( c . 1160 Morocco – January 23 , 1199 Marrakech , Morocco ) , also known as Moulay Yacoub , was the third Almohad Caliph . Succeeding his father , al - Mansur reigned from 1184 to 1199 . His reign was distinguished by the flourishing of trade , architecture , philosophy and the sciences , as well as by victorious military campaigns in which he was able to temporarily stem the tide of Christian Reconquista in the Iberian Peninsula . Dynastic and Iberian Wars . Al - Mansur ' s father was killed in Portugal on July 29 , 1184 ; upon reaching Seville with his father ' s body on August 10 , he was immediately proclaimed the new caliph . Al - Mansur vowed revenge for his father ' s death , but fighting with the Almoravids , who had been ousted from the throne , delayed him in Africa . After inflicting a new defeat on the Almoravids , he set off for the Iberian Peninsula to avenge his father ' s death . His 13 July 1190 siege of Tomar , center of the Portuguese Templars failed to capture the fortress . However , further south he in 1191 recaptured a major fortress , Paderne Castle and the surrounding territory near Albufeira , in the Algarve - which had been controlled by the Portuguese army of King Sancho I since 1182 . Having inflicted other defeats on the Christians and captured major cities , he returned to Morocco with three thousand Christian captives . Upon Al - Mansur ' s return to Africa , however , Christians in Iberian Peninsula resumed the offensive , capturing many of the Moorish cities , including Silves , Vera , and Beja . When Al - Mansur heard this news , he returned to the Iberian Peninsula , and defeated the Christians again . This time , many were taken in chained groups of fifty each , and later sold in Africa as slaves . While Al - Mansur was away in Africa , the Christians mounted the largest army of that period , of over 300 , 000 men , to defeat Al - Mansur . However , immediately upon hearing this , Al - Mansur returned again to Iberia and defeated Castilian King Alfonso VIII Alfonso ' s army in the Battle of Alarcos , on July 18 , 1195 . It was said that Al - Mansur ' s forces killed 150 , 000 and took money , valuables and other goods " beyond calculation " . It was after this victory that he took the title " al - Mansur Billah " ( " Made Victorious by God " ) . Internal policy . During his reign , Al - Mansur undertook several major projects . He built the Koutoubia and El Mansouria mosques in Marrakech and the kasbah of the Udayas , accessed by Bab Agnaou and Bab Ksiba in the southern part of its medina . He attempted to build what would have been the world ' s largest mosque in Rabat . However , construction on the mosque stopped after al - Mansur died . Only the beginnings of the mosque had been completed , including the Hassan Tower . 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 Zahiri te 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 heritage . He died in Marrakech , Morocco . 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 Abou Mohammed Salah ben Abd el - Halim of Granada in his 1326 " " Roudh el - Kartas " " ( " History of the Rulers of Morocco " ) . The town of Moulay Yacoub , outside of Fez , Morocco , is named after Al - Mansur , and is best known for its therapeutic hot springs .