If two or more are equal in this, then it is the one who has the most knowledge of the Sunnah. If they are equal in that, then it is the one who performed the migration first. If they are equal in that, then it should be the eldest.
Abu Sa'id narrates that the Prophet said: "If you are three in number, then one of you should be the imam. And the one who has the most right to it is the one who is the most versed in the Qur'an." This is related by Ahmad, Muslim, and an-Nasa'i. The meaning of "most versed in the Qur'an" is the one who has more of the Qur'an memorized. This interpretation is based on the hadith from Amr ibn Salamah which says: "Your imam should be the one who is most versed in the Qur'an."
Ibn Mas'ud reports that the Prophet sallallahu alehi wasallam said: "The imam of a people should be the one who is the most versed in the Book of Allah. If they are equal in their recital, then the one who is most knowledgeable of the sunnah. If they are equal in the sunnah, then [it is] the one who migrated first. If they are equal in that, then [it is] the eldest. And no man should be an imam for another man if the other holds authority [i.e., a leader in any capacity or ruler of the Muslim people]. And one should not occupy his place of honor in his house without his permission." In another narration it is stated: "No man should be the imam for another while with the other's family or where the other is in authority." This is related by Ahmad and Muslim.
As stated earlier, it is better for women to pray in their houses. Ahmad and at-Tabarani record that Umm Humaid as-Sa'diyah came to the Messenger of Allah and said: "O Messenger of Allah, I love to pray with you." The Prophet said: "I am aware of that, but your Salah in your residence is better for you than your salah in your people's mosque. And your salah in your people's mosque is better than your salah in the [larger] congregational Mosque."
Sa'id ibn Mansur says: "A person should not be an imam for another where the other is in authority except with his permission." The meaning of this is that the one in authority, owner of a house, leader of a meeting, and so on, has more right than others to be the imam if he has not granted the permission to any of the others. Abu Hurairah reports that the Prophet sallallahu alehi wasallam said: "It is not allowed for a man who believes in Allah and the last day to be an imam for a people, except with their permission, nor may he specifically make supplications for himself without including them. If he does so, he is disloyal to them." This is related by Abu Dawud.
Whose imamate is acceptable
The imamate of all the following is acceptable: a discerning boy, a blind person, a standing person for those who are sitting, a sitting person for those who are standing, a person praying fard for people who are praying nafl, a person praying nafl for people who are praying fard. Likewise, a person who has performed ablution can be imam for people who have performed tayammum, as can be a person who has performed tayammum for people who have performed ablution, a traveler for the resident, a resident for the travelers, and a less qualified person for people who are more qualified.
'Amr ibn Salamah led his people in salah while he was six or seven years old. The Messenger of Allah sallallahu alehi wasallam twice appointed Ibn Umm Maktum, a blind man, to lead the people of Madinah in prayer. The Messenger of Allah, during his last illness, prayed behind Abu Bakr in a sitting position. And he prayed in his house in a sitting position while those behind him were standing. He pointed to them to sit and when he had finished the prayer he said: "The imam has been appointed to be followed. If he goes into ruku', then make ruku'. When he raises his head, raise your head. If he prays sitting, then pray sitting behind him."
Mu'azh would pray 'isha with the Prophet sallallahu alehi wasallam and then return to his people and lead them in the same prayer, it being nafl for him and fard for the others.
Muhjan ibn al-Adra' reports: "I came to the Messenger of Allah in the mosque and they prayed and I did not. He said to me: 'Why didn't you pray?' I said: 'O Messenger of Allah, I prayed in my place and then came here.' He then said: 'When you come [to the mosque], pray with them and make it supererogatory."'
The Messenger of Allah saw a man praying by himself and said: "Who will give charity to this person by praying with him?" 'Amr ibn al-'Aas led others in prayer when he had made tayammum only and the Prophet approved of it.
The Prophet sallallahu alehi wasallam, after the conquest of Makkah, led the people in prayer by praying two rak'at (except for maghrib) and said: "O people of Makkah, stand and pray the last two rak'at as we are travelers."
If a traveler prays behind a resident, he must complete the whole four rak'at even if he only prayed part of a rak'ah behind the resident imam. Ibn 'Abbas was asked: "Why is the traveler to pray two rak'at if he prays by himself and four rak'at if he prays behind a resident?" He answered: "That is the sunnah." In another version, Musa ibn Salamah said to him: "If we pray with you, we pray four rak'at otherwise we pray two?" He told him: "That is the sunnah of Abu al-Qasim [the Prophet]." This is related by Ahmad.
Whose imamate is not acceptable
It is not allowed for one who has a health problem which does not allow him to remain in a state of purity to be an imam for others who do not have such a problem. This is the opinion of the majority of the scholars. According to the Maliki school, such a person's imamate will be valid, but it is disliked to make such a person the imam.
A man leading a group of women in prayer
Abu Ya' la and at-Tabarani, in al-Ausat, record, with a Hasan chain, that Ubayy ibn Ka'b came to the Messenger of Allah and said: "O Messenger of Allah, I did something last night." The Prophet asked: "What was that?" He said: "The women in my house said, 'You recite and we do not recite so lead us in salah. ' So I prayed eight rak'at and witr (with them)." The Prophet remained silent, and Ka'b said: "We took his silence as a sign of his approval."
Evildoer or innovator forbidden to lead prayer
Al-Bukhari records that Ibn 'Umar prayed behind al-Hajjaj. Muslim records that Abu Sa'id al-Khudri prayed salatul 'id behind Marwan.
Ibn Mas'ud once prayed four rak'at of fajr, behind al-Walid ibn 'Uqbah ibn Abu Ma'it who used to drink wine, and 'Uthman ibn 'Affan had him flogged. The companions and their successors prayed behind Ibn 'Ubaid who was accused of propagating heresies. According to the scholars, anyone whose prayer is valid on an individual basis, his imamate is also valid for others. However, they dislike to pray behind an evildoer or innovator.
As-Sa'ib ibn Khilad relates that a man was leading the people in salah and he spat in the direction of the qiblah. The Messenger of Allah saw this and said: "Do not let him lead you in salah." After this, the man wanted to lead the people in salah but they prevented him and told him what the Prophet had said. The man went to the Prophet sallallahu alehi wasallam, to ask him about that, and the Prophet said: "Yes, [it is true] for you have offended Allah and His Messenger." This is related by Abu Dawud and Ibn Hibban. Abu Dawud and al-Munzhiri are silent about it. <<<<<<<<<<<<<To be continued