In 1080 the Almoravide sovereign Yusef ibn Tashfin, after besieging and sacking Agadir, built a new town on the site of his camp. The new town, called Tagrart, became the commercial quarter, whilst Agadir remained the royal residence.
When Alphonso took Toledo in 1085, El Motamid called in Yusef ibn Tashfin, the Almoravide (see Spain, History, and Almoravides).
In 1061 Abu Bakr made a division of the power he had established, handing over the more settled parts to his cousin Yusef ibn Tashfin, as viceroy, resigning to him also his favourite wife Zainab, who had the reputation of a sorceress.
Ibn Tashfin, who was largely guided by Zainab, had in the meantime brought what is now known as Morocco to complete subjection, and in 1062 had founded the city of Marrakesh ("Morocco City").
After 'Ali's death in 1142, his son Tashfin lost ground rapidly before the Muwahhadis, and in 1145 he was killed by a fall from a precipice while endeavouring to escape after a defeat near Oran.
The amirs of the Murabti dynasty were as follows: - Yusef I., bin Tashfin (1061); `Ali III.
(1106); Tashfin I.