the invading Fatimids, who claimed the caliphate in opposition to the generally recognised Abbasid caliph of Baghdad, Al-Mu'tadid, Abd al-Rahman III claimed the title of caliph himself. This helped Abd al-Rahman III gain prestige with his subjects, and the title was retained after the Fatimids were repulsed. The rule of the caliphate is considered as the heyday of Muslim presence in the Iberian Peninsula, before it fragmented into various taifas in the 11th century. This period was characterised by a flourishing in technology, trade and culture; many of the buildings of al-Andalus were constructed in this period. Almohad Caliphate (1147–1269) The Almohad Caliphate (, from Arabic , "the Monotheists" or "the Unifiers") was a Moroccan Berber Muslim movement founded in the 12th century. The Almohad movement was started by Ibn Tumart among the Masmuda tribes of southern Morocco. The Almohads first established a Berber state in Tinmel in the Atlas Mountains in roughly 1120. The Almohads succeeded in overthrowing the Almoravid dynasty in governing Morocco by 1147, when Abd al-Mu'min (r. 1130–1163) conquered Marrakech and declared himself caliph. They then extended their power over all of the Maghreb by 1159. Al-Andalus followed the fate of Africa, and all Islamic Iberia was under Almohad rule by 1172. The Almohad dominance of Iberia continued until 1212, when Muhammad al-Nasir (1199–1214) was defeated at the Battle of Las Navas de Tolosa in the Sierra Morena by an alliance of the Christian princes of Castile, Aragon, Navarre and Portugal. Nearly all of the Moorish dominions in Iberia were lost soon after, with the great Moorish cities of Córdoba and Seville falling to the Christians in 1236 and 1248, respectively. The Almohads continued to rule in northern Africa until the piecemeal loss of territory through the revolt of tribes and districts enabled the rise of their most effective enemies, the Marinid dynasty, in 1215. The last representative of the line, Idris al-Wathiq, was reduced to the possession of Marrakesh, where he was murdered by a slave in 1269; the Marinids seized Marrakesh, ending the Almohad domination of the Western Maghreb. Fatimid Caliphate (909–1171) The Fatimid Caliphate was an Isma'ili Shi'i caliphate, originally based in Tunisia, that extended its rule across the Mediterranean coast of Africa and ultimately made Egypt the centre of its caliphate. At its height, in addition to Egypt, the caliphate included varying areas of the Maghreb, Sicily, the Levant and the Hejaz.