The ruling system in Islam, ordained by the Lord of the worlds, is the Khilafah system, in which a Khalifah is appointed by a bay’ah. This is established by the book of Allah, the Sunnah of His Messenger and the ijma’ of the Sahabah.
Allah (swt) says:
"So judge between them by that which Allah has revealed and follow not their desires away from the truth that has come to you..." [5:48]
He (swt) also says:
"Judge between them by that which Allah has revealed and follow not their desires and beware of them lest they seduce you from some part of that which Allah has revealed to you..." [5:49]
This instruction from Allah (swt) to the Messenger (saw)regarding ruling by that which Allah (swt) had revealed is also an instruction a speech to his (saw) Ummah. It means they have to appoint a ruler following the Messenger of Allah (swt) that governs them by that which Allah (swt) has revealed. The command contained in Allah’s (swt) words indicates decisiveness because the subject-matter pertaining to His (swt) speech is that of a (fard). This is a definitive indication (qarinah) according to the science of usul (principles of jurisprudence). The ruler that governs amongst Muslims after the Messenger of Allah (swt), with that which Allah revealed, is called the Khalifah. Accordingly, the ruling system is called the Khilafah system.