Imam Abu Mansur al-Baghdadi on the Caliphate

The generality (jamhūr) of Orthodox Muslims (Ahl al-Sunnah wa al-Jamā‘ah) are agreed about certain principles (uṣūl) of the essentials (arkān) of religion, and a knowledge of the essence of every one of these is binding on every understanding, mature person…

As for these principles, the Orthodox (Ahl al-Sunnah) are agreed about their basic character and they accuse of misguidance anyone who contradicts them…

Regarding the twelfth essential (rukn) relating to the Caliphate and Imāmate, they [the Orthodox] say that the Imāmate is a duty (far) incumbent on the Community (Ummah), because the appointment of an Imām establishes judges and executives. He guards their frontiers, leads their armies, apportions the booty among them, and establishes justice for the wronged against the oppressor…

[Imam Abu Mansur al-Baghdadi, al-Farq bayn al-Firaq, Chapter 5, Section 3]