He has been described as a North African Almoravid ruler and conqueror who created the first Berber Empire uniting North Africa and Spain. Leader of the Almoravid, a newly emerged Islamic power in North Africa, Yusuf ibn Tashfin (also spelled Tashufin) conquered Morocco and founded Marrakesh as the Almoravid capital in 1062.
Before 1061, not much was known about Tashfin apart from the fact that he belonged to the Berber family which, alongside Abdullah ibn Yasin, had founded the Almoravid movement a decade earlier. In 1061, Tashfin was appointed commander of the Almoravid armies in Morocco by his cousin Abu Bakr. This was to enable Abu Bakr, who was then leader of the Almoravids, to go south into the desert to put down a tribal rebellion. Upon his return, he realized that Tashfin had fulfilled his duties as commander honorably, thus, Abu Bakr relinquished his power and even his wife to Tashfin.
Tashufin would go on to become the leader of the Almoravids and found Marrakech (the Almoravid capital) in 1062 after having conquered Morocco and Algeria. By 1063, Tashfin had brought the cities held by the Zenata Berbers of central Morocco under his control, leading to the final conquest of Fez, Morocco in 1069.
Tashfin subsequently led the Almoravid armies in expeditions to the north and east for 12 years. By 1082, he had conquered almost all of Morocco and western Algeria. Due to his military strength and several victories, he became well known in Muslim Spain, which was at the time under attack from the Christian armies of northern Spain led by Alfonso VI of León and Castile.
The Muslims of Spain, who were weakened and divided, asked Tashfin to help them fight the Christian armies, especially after the fall of the city of Toledo in 1085. Tashfin and his Almoravid armies entered Muslim Spain, assuming control of it in 1090 while maintaining their primary seat of government in Marrakesh.
All in all, Tashfin crossed into Spain four times, according to one account. The first time was in 1086 when he defeated Alfonso VI of Castile at az-Zallaqah. Two years later, Tashfin was defeated by the Christian forces which had regained power and strength. Tashfin there and then realized that the only way to strengthen the Muslims in Spain was to unite them by force. Thus, in 1090 when he returned to Spain, he campaigned against the Muslim kings for the reason that they had neglected their responsibilities as Muslim sovereigns.
The fourth expedition, which was in 1097, ended in Almoravid control over the southern half of the Iberian Peninsula. At the end of the 11th century, Tashfin had succeeded in uniting Morocco and Muslim Spain under Berber rule. And as Tashfin and his army took control of Muslim Spain in the 1090s while maintaining their principal seat of government in Marrakesh, the Almoravids came to rule parts of the Sahara, Morocco, Algeria, and Spain and controlled significant ports as well as trans-Saharan trade, a report by The Met said. By the time of Tashfin’s death in 1106, he controlled almost all of Muslim Spain.