Aghmat
Al-Mu'tamid was not the only fallen ruler of al-Andalus sent here. Abdallah ibn Buluggin, the last Zirid king of Granada, deposed by the Almoravids in 1090, wrote his memoirs in exile at Aghmat. The town's last part in great events came with the Almohads. Ibn Tumart passed through it on his way home from the East before raising the High Atlas against the Almoravids, and between 1126 and 1130 the armies of the Almoravid sultan Ali ibn Yusuf fought the Almohads near the town more than once. In 1146 'Abd al-Mu'min entered Aghmat without a fight, a year before Marrakesh itself fell to him and the Almoravid state came to an end.