After Abu Yusuf Yaqub al-Mansur, upon reaching Seville on August 10 with the body of his father, killed in Portugal on July 29, 1184, had immediately been proclaimed the new caliph.
Al-Mansur had vowed revenge for his father's death, but fighting with the Almoravids, who had been ousted from the throne, had delayed him in Africa.
After inflicting a new defeat on the Almoravids, he had set off for the Iberian Peninsula to avenge his father's death.
His siege of Tomar, center of the Portuguese Templars, on July 13, 1190, had failed to capture the fortress.
However, further south he in 1191 recaptures a major fortress, Paderne Castle and the surrounding territory near Albufeira, in the Algarve—which has been controlled by the Portuguese army of King Sancho I since 1182.
Having inflicted other defeats on the Christians and captured major cities, he returns to Morocco with three thousand Christian captives.