Almoravids (ălmôr´əvĬdz), Berber Muslim dynasty that ruled Morocco and Muslim Spain in the 11th and 12th cent. The Almoravids may have originated in what is now Mauritania. The real founder was Abd Allah ibn Yasin, who by military force converted a number of Saharan tribes to his own reformed religion and then advanced on Morocco. After his death (c.1059), Yusuf ibn Tashfin and his brother Abu Bakr came to power. Marrakech was founded in 1062 and was the center of a powerful empire. Called by the Moors in Spain to help stem Christian reconquest, Yusuf entered Andalusia and defeated (1086) Alfonso VI of Castile. He later subdued the local Muslim rulers and governed Muslim Spain and N Morocco (Abu Bakr ruling over S Morocco). The dynasty also pushed south, destroying the ancient state of Ghana. The Almoravids were rough and puritanical, contemptuous of the luxurious Muslim courts in Spain. Their rule was never entirely stable and in the 12th cent. was attacked by the Almohads, who finally (by 1174) won both Morocco and Muslim Spain.