Aḥmad III Abū Jaʿfar ibn ʿAbd al-Malik al-Mustanṣir[1] (Arabic: أحمد الثالث أبو جعفر بن عبد الملك المستنصر; died 5 February 1146),[2] called Sayf al-Dawla ("Sword of the Dynasty"), Latinised as Zafadola,[a] was the last ruler of the Hudid dynasty.
After the city of Zaragoza was conquered by the Almoravids in 1110, ʿAbd al-Malik and Sayf al-Dawla fled to Rueda to resist the invaders.
The latter sent an embassy led by Count Rodrigo Martínez and the king's counsellor Gutierre Fernández de Castro to Rueda to make final arrangements.
[5] Alfonso in turn gave Sayf al-Dawla territory in the Kingdom of Toledo and the task of defending a sector of the southern frontier from the Almoravids.
[6] Sayf al-Dawla took part in battles with the Almoravids in Jaén, Granada and Murcia, and also fought against Alfonso the Battler.