Some time around 1117, Abd al-Mu'min became a follower of
Ibn Tumart, leader of the
Masmudas (a
Berber tribe of present-day western Morocco), a religious and military leader of renowned piety who had founded the
Almohads as a religious order with the goal of restoring purity in Islam. His group had long been at odds with the
Almoravids and had been forced into exile in the mountains. Abd al-Mu'min stayed with Ibn Tumart as he journeyed slowly towards
Marrakesh. It was there that his mentor declared himself the
Mahdi (divinely guided one) and that he was opposed to the
Almoravid dynasty. since the Almohads were going through a difficult time in their fight against the Almoravids. Abd al-Mu'min also feared that the Masmuda (the Berber tribe of Ibn Tumart) would not accept him as their leader since he was an outsider. He did eventually lead the Almohads when a family relationship was arranged between him and Cheikh Abu Hafs, the leader of the Masmuda. Under him, the Almohads swept down from the mountains, eventually destroying the power of the faltering Almoravid dynasty by 1147. Abd al-Mu'min created his empire by first winning control of the high Atlas Mountains, then the Middle Atlas, into the
Rif region, eventually moving into his homeland north of
Tlemcen. The Almohads' involvement in Al-Andalus began as early as 1145, when Ali ibn Isa ibn Maymun, the Almoravid naval commander of
Cadiz, defected to 'Abd al-Mu'min. In the same year, Ibn Qasi, the ruler of
Silves, was one of the first Andalusian leaders to appeal for Almohad intervention in Al-Andalus in order to stop the advance of the Christian kingdoms, whom the faltering Almoravids were unable to contain. In 1147 Abd al-Mu'min sent a military force led by another Almoravid defector, Abu Ishaq Barraz, who captured
Algeciras and
Tarifa before moving west to
Niebla,
Badajoz, and the
Algarve. The Almoravids in
Seville were besieged in 1147 until the city was captured in 1148 with local support. Around this time a major rebellion centred in the
Sous valley, led by Muhammad ibn 'Abd Allah al-Massi, shook the Almohad Empire and took on religious dimensions, rallying various tribes to counter the Almohads. Some important cities such as
Ceuta,
Salé, and
Sijilmassa overthrew their Almohad governors. An Almoravid, Yahya ibn al-Sahrawiyya, was declared ruler of Ceuta. After initial Almohad setbacks, the rebellion was eventually suppressed thanks to Abd al-Mu'min's lieutenant, Umar al-Hintati, who led a force that killed al-Massi. Abd al-Mu'min is said to have resorted to more draconian measures afterwards and initiated a purge of people he thought might be disloyal among the subject Berber tribes, allegedly resulting in around 30,000 executions. The rebellion had taxed Almohad resources and resulted in temporary reversals in Al-Andalus too, but the Almohads soon went on the offensive again. Responding to local appeals from Muslim officials, they took control of
Cordoba in 1149, saving the city from the forces of Alfonso VII. The remaining Almoravids in Al-Andalus, led by
Yahya ibn Ghaniya, were by then confined to
Granada. In 1150 or 1151 Abd al-Mu'min summoned the leaders and notables of Al-Andalus under his control to Ribat al-Fath (
Rabat), where he made them pledge loyalty to him, apparently as a political demonstration of his power. The Almoravids in Granada were defeated in 1155 and retreated to the Balearic Islands, where they held out for several decades. For much of the 1150s, however, Abd al-Mu'min concentrated his efforts on expanding eastwards across North Africa to Ifriqiya. By 1151, he had reached
Constantine where he confronted a coalition of Arab tribes that had been marching through Berber lands. Rather than destroying these tribes, he utilised them for his campaigns in al-Andalus and they also helped to quell any internal opposition from the family of Ibn Tumart. Abd al-Mu'min led his forces to conquer Tunis in 1159, going on to progressively establish control over Ifriqiya by
conquering the cities of
Mahdia (then held by
Roger II of
Sicily),
Kairouan, and other coastal cities as far as
Tripoli (in modern-day
Libya). He then returned to Marrakesh and left for an expedition to Al-Andalus in 1161. Abd al-Mu'min had ordered the construction of a new citadel at Gibraltar, where he based himself during his stay in Al-Andalus. == Final years ==