Abū Yūsuf Yaʿqūb ibn Yūsuf ibn Abd al-Muʾmin al-Manṣūr (; c. 1160 – 23 January 1199 Marrakesh), commonly known as Yaqub al-Mansur () or 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 successful in repelling the tide of the Reconquista in the Iberian Peninsula. Military actions Al-Mansur's father was killed in Portugal on 29 July 1184; upon reaching Seville with his father's body on 10 August, he was immediately proclaimed the new caliph. Al-Mansur vowed revenge for his father's death, but fighting with the Banu Ghaniya, delayed him in Africa. After inflicting a new defeat on the Banu Ghaniya, 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 the Maghreb 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 18 July 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 Architectural patronage During his reign, Al-Mansur undertook several major construction projects. He added a monumental gate to the Kasbah of the Udayas in Rabat and he may have been responsible for finishing the construction of the current Kutubiyya Mosque