Yusuf ibn Tashfin, also Tashafin, Teshufin, (; reigned c. 1061 – 1106) was leader of the Berber Almoravid empire. He co-founded the city of Marrakesh and led the Muslim forces in the Battle of Sagrajas. Yusuf ibn Tashfin came to Al-Andalus from the Maghreb to help the Muslims fight against Alfonso VI, eventually achieving victory in Sagrajas and promoting an Islamic system in the region. In 1061 he took the title “Amir al-Muslimeen” recognising the suzerainty of the Abbasid Caliphate. He was married to Zaynab an-Nafzawiyyah, whom he reportedly trusted politically. Succession to power Yusuf ibn Tashfin was a Berber from the Banu Turgut, a branch of the Lamtuna, a Tuareg tribe belonging to the Sanhaja group. The Sanhaja were linked by medieval Muslim genealogists with the Yemeni tribe of Himyar through semi-mythical and mythical pre-Islamic kings and for some reason, some of the contemporary sources (e.g., Ibn al-Arabi) add the nisba al-Himyari to Yusuf's name to indicate this legendary affiliation. For example, his surname is documented as Al-Sanhaji Al-Himyari in the 14th century work by Ismail ibn al-Ahmar. Modern scholarship rejects this Berber–Yemeni link as fanciful. Abu Bakr ibn Umar, a natural leader of Lamtuna extraction, a branch of the Sanhaja, and one of the original disciples of ibn Yasin who served as a spiritual liaison for followers of the Maliki school of Islamic jurisprudence, was appointed chief commander after the death of his brother Yahya ibn Umar al-Lamtuni. His brother oversaw the military for ibn Yasin but was killed in the Battle of Tabfarilla against the Godala tribes in 1056. Ibn Yasin, too, would die in battle against the Barghawata three years later. Abu-Bakr was an able general, taking the fertile Sūs and its capital Aghmāt a year after his brother's death, and would go on to suppress numerous revolts in the Sahara—on one such occasion entrusting his pious cousin Yusuf with the stewardship of Sūs and thus the whole of his northern provinces. He appears to have handed him this authority in the interim but even went as far as to give Yusuf his wife, Zaynab an-Nafzawiyyah, purportedly the richest woman of Aghmāt. This sort of trust and favor on the part of a seasoned veteran and savvy politician reflected the general esteem in which Yusuf was held, not to mention the power he attained as a military figure in his absence. Daunted by Yusuf's new-found power,