The milestones, for the process of appointing a leader by the masses, in any system are identical: nomination, selection and affirmation. First, the various candidates are nominated and declared; then the selection process decides the winner from amongst the nominated candidates, who effectively becomes the leader. Finally, the appointed leader affirms this publically through some sort of ceremony, for example, the US President’s inauguration, where the elected President takes an ‘oath’ to uphold the constitution, and start the Presidency. The third stage is merely the confirmation process, to openly declare what has already been decided in the selection stage.
In the tribal society of 7th century Mecca, the process of nomination and selection was vastly simplified and merged, but the nation states of today, in comparison are far more complex and larger; various candidates will compete for power from amongst the millions of citizens. Hence, the processes are far more formal and structured. When the system is framed, these processes are codified, and the masses agree to obey the leader who is appointed through the selection process, this is where the contract takes place. The obedience of the masses is given to the leader appointed, on the condition that he upholds the constitution, and the laws and values.
This nomination and selection process has varied with time and place; hence, the Prophet (saw) was silent about who should succeed after his demise, and he was also silent about the process of appointing a Khalif; this is reflected in the variations in the appointment of the first four Khalifs, and the subsequent chaos that ensued through the rebellion of Mu’awiyah.