Most Sunni scholars are of the opinion that Caliphate...
Most Sunni scholars are of the opinion that Caliphate (khilafah) and Imamate (imamah) are synonymous both signifying the heavy social and political responsibility bestowed on the caliph who attains his position of guardianship for the affairs of the Muslims by election. The caliph both solves the religious problems of the people and assures public security and guards the frontiers of the country through the exercise of military power.
The caliph (or Imam) is therefore at one and the same time a leader of conventional type and a ruler concerned with the welfare of society whose ultimate aim is the establishment of justice and guarding the frontiers of the country it is for the sake of these aims that he is elected. According to this concept the qualifications for leadership are governmental competence and capacity for rule.
On the one hand the leader must punish errant and corrupt individuals by implementing the penalties God has decreed; hold in check those who would transgress against the rights of others; and repress rebellious and anarchic ruffians.
On the other hand by acquiring the necessary military equipment and organizing a powerful army he must both protect the frontiers of the Islamic state against all aggression and also confront with jihad and ( 13 ) armed struggle various forms of shirk and corruption and factors of ignorance and unbelief if they prevent the progress or the implementation of true religion and the dissemination of tawhid by way of propagation and guidance powers proves impossible.
In this view of things it does not present a major problem if the leader or ruler has no background of erudition with respect to God's ordinances or even if he has strayed beyond the boundaries of piety and polluted himself with sin. Anyone can lay claim to the title of successor (khalifah) to the Prophet who undertakes the tasks he used to fulfil.
It is not offensive if some oppressive tyrant establishes his dominance over Islamic society by trampling the rights of the people shedding their blood and exercising military force calling himself the leader of the Muslims; or if some two-faced politician assumes the office of successor to the Prophet and then proceeds to rule over people despite his lack of spiritual and moral qualities cancelling all notion of justice and equity.
Indeed not only is it impermissible to oppose him; it is necessary to obey him.