State according to Muslim law is ruled by God according to his law. He is the sole head of the state. The earthly head, whom the laws call Imam, is merely an executive to enforce the law, a political and social necessity. Some argued that as the office of Imam had been the cause of strife it might be wise to do without one and be content with the law alone. It was assumed that he would be chosen by the leaders of the community and a second assumption was that these leaders were the learned in the law. He had to fulfill eleven conditions, among them these- he must be an adult male Muslim, belong to the tribe of Quraish, be in full possession of all his faculties, not a cripple, and be learned in the Holy Quran and law. The majority says that he must be the most worthy of his time for the post; some waived this condition if the most worthy had refused the office. It is not a condition of his appointment that he should be infallible and without sin. Indeed he must not be removed from office when he does wrong. His functions are to preserve religion in its original purity, to see that the law is obeyed and the penalties decreed by God inflicted, to defend the frontiers, equip the army and make the necessary payments from the treasury regularly but without extravagance, to collect the taxes, to keep down violent men, thieves and brigands, to maintain the Friday and festival prayers, to settle disputes, to receive witness about people`s rights, to marry minors both boys and girls who have no guardians, to divide booty, to appoint trustworthy men to office, and to take personal share in the business of the state, giving it full attention.
It is not easy to give a plain account as the spheres of the various authorities overlap. There is no distinction of civil from criminal jurisdiction so all cases may come before the judge. He must be an upright man and learned in the law; usually he followed one of the four schools though some gave decisions according to two or even more schools. Every big town had its judge. In early times those in the provinces were appointed by the governor, only occasionally by the Caliph. He held his court in his own house or in the mosque. Some held that he ought not to sit in the mosque as non-Muslims could not approach him there. Non-Muslims appeared before him in cases against Muslims or of their own choice. In the latter case they elected to be judged by Muslim law. The plaintiff had to produce evidence while the defendant was allowed to clear himself by oath. The judge was assisted by witnesses who originally testified to the character of the parties and not to the facts. They were more or less officials and came to perform some of the minor duties of the judge. As a rule the judge cannot act till one or both parties to a case call him in. If it is a matter of religion, he can act on his own initiative. The law being what it is, it is easy to see that the boundary line between the two classes is vague. Thus, obstructions to a highway come under the head of religious matters.
In a big town there may be two or more judges representing different schools; there was an army judge and one accompanied the pilgrim caravan. The judge, or senior judge, in the capital was chief justice with some kind of supervision over the other judges. Further the judge is guardian of orphans, idiots, and those who have been restrained by law from control of their own affairs, if they have no natural guardian. This includes arranging suitable marriages for his wards. He is also supervisor of religious and charitable foundations (Waqf) and has to see that they serve the objects for which they were created; he has to watch over wills to see that they do not infringe the law and that the provisions in them are carried out. Subordinate appointments made by a judge lapsed at his death.
Among other important officials in administration are the Mufti, the Muhtasib or the inspector of markets, the Chief of Police and the preacher.