8 – This hierarchy must be observed whenever a congregation gathers to pray or when appointing an imam for a mosque. If, however, the mosque already has a permanent imam, he takes precedence—even if someone more qualified is present—because the Prophet ﷺ said, “Let no man lead another in prayer within his own domain.”
9 – Whenever the owner of a place is fit to lead, he has the stronger claim to that role.
(a) The supreme leader of the Muslims and the governor in charge of a given region are the most entitled to lead the prayer within the area of their authority.
(b) Likewise, the head of a household or the director of an office is more entitled to lead than a visiting guest.
Hence it is not permissible to sit on a person’s bedding without his permission; in the same way, the sequence of authority in leading the prayer moves from the best qualified to the next best. On this basis the Companions argued for Abu Bakr’s right to the greater caliphate after the Prophet’s death, saying, “The Messenger of Allah was pleased with you for our religion—shall we not then be pleased with you for our worldly affairs?”
From the Sacred Law we learn through this order that authority must always be entrusted to the most qualified, so that our affairs remain upright and our conditions sound. Indeed, one of the ways trust is betrayed is to place authority in unworthy hands.
10 – Al-Ghāyah states: “With the mosques erected by local residents or by individual clans, the right to lead belongs to whomever they are satisfied with, and he is not to be removed unless his condition changes.”
Imam Ahmad wrote in his Risālah: “It is incumbent upon the Muslims to put forward their best—those of religion and, best of all, those who possess knowledge of Allah, who fear Him and are ever mindful of Him.”
Al-Hārithī said: “The person who is most entitled according to the Sacred Law must be appointed to public posts and to lead the mosques.”
Al-Māwardī said: “It is forbidden for the ruler to appoint a flagrant sinner as the imam for prayer, for he is obliged to look after the community’s welfare.”