Ibadi Muslims affirm that leadership of the community belongs to the most qualified person chosen by the believers, not to a hereditary line or a divinely designated Imam. The imam is elected for his knowledge, piety, and justice, may be deposed if he fails, and need not be of the Prophet's family or the tribe of Quraysh. Ibadi political theology even recognises that the community may live without a manifest imam in conditions of concealment, or under a defensive imam raised up for a particular need.
Historically the doctrine produced real states: the Rustamid Imamate, centred at Tahert in what is now Algeria, governed by elected Ibadi imams from 776 to 909 CE, and in Oman an interior Imamate persisted, with interruptions, into the twentieth century. Its last independent phase ended in the Jebel Akhdar War (1954 to 1959), when Imam Ghalib bin Ali's forces were defeated by Sultan Said bin Taimur with British military support, folding the interior Imamate into the Sultanate of Oman and ending elected Ibadi imamate rule as a functioning state institution, though Ibadi legal and theological authority has continued within Oman under the Sultanate. Selection traditionally involved a council of qualified scholars (ahl al-hall wa'l-aqd, "those who loose and bind") who vetted candidates and extended the pledge of allegiance, a consultative mechanism Ibadi political theory shares in principle, though not in detail, with early Sunni caliphal selection.