Under the leadership of Imam Abu al-Khattab al-Ma'afari, the Nafusa descended from the mountains and proceeded to conquer all of the crumbling Fihrid emirate of Ifriqiya - capturing Tripoli in 757 and Kairouan in 758.
[2] But the Abbasid Arab governor of Egypt invaded Ifriqya, defeated the Nafusa in a battle at Tawergha in 761 (his third attempt - his first two armies had been repulsed) and put an end to their putative new state.
The Imamate of Nafusa was in close alliance with the other Ibadi remnant, the Rustamid dynasty in Tiaret, both constant thorns on either side of the Aghlabids, in communication with each other across the back highlands of North Africa.
In 896-97, the Aghlabid emir Ibrahim II of Ifriqiya recovered Tripolitana and defeated the Nafusa in a great battle at Manu (south of Gabès).
In the aftermath, citing them as heretics, Ibrahim II executed all the Nafusa prisoners and put an end to their independent imamate (Tahert fell shortly after, in 911).
Despite the destruction of their states, Ibadi Islam remained a strong (if clandestine) faith among the Berbers of the Nafusa mountains for centuries after, down to the modern day.
[4] The terrain and topography of the region are critical strategic factors, constraining mechanised advances from the flat plain and plateau, and favouring guerrilla tactics based on close local knowledge and the advantage of high ground.
Towns in the mountains include Gharyan, Yafran, Zintan, Qotros, Jadu, Kabaw, Al-Qawalish and Nalut, which have all been the sites of military action during the 2011 civil war.