minah-al-rawd-al-azhar-fi-sharh-al-fiqh-al-akbar

They reached consensus on the obligatory nature of the appointment of the Imam, the only difference being as to whether it is obligatory on Allah or on people, with transmitted or intellectual evidence.
The position of the people of the Sunnah and the great majority of the Mu‘tazilah is that it is an obligation on people because of:

1. evidence transmitted in his words () in that which Muslim narrated in the hadith of Ibn ‘Umar (raḍyAllāhu 'anhu (may Allāh be pleased with him)) in this wording: “Whoever dies without an imam dies the death of the time of ignorance,”

2. and because the Companions (raḍyAllāhu 'anhum (may Allāh be pleased with them)) considered the most important of all matters to be the appointment of the imam to such an extent that they gave it precedence over his burial ()

3. and because there is no avoiding the necessity of the Muslims having an imam who undertakes to execute their legal judgements, establish their udūd limits, protect their borders, equip their armies, take their zakat (sadaqāt), conquer insurgents, thieves and brigands, establish the jumu‘ahs and the Eids, marry off young people who have no guardians, divide up the spoils of battle, and the similar duties of the Shari‘ah which individual members of the Ummah cannot take upon themselves.

[Mulla ‘Ali al-Qari, منح الروض الأزهـر في شرح الفقـه الأكبـر. Translated by Sidi Abdassamad Clarke]