Abu Sa'id al-Khudri reported Allah's Messenger (ﷺ) as saying: When there are three persons, one of them should lead them. The one among them most worthy to act as Imam is one who is best versed in the Qur'an.
Hadith Referenceصحيح مسلم / كتاب المساجد ومواضع الصلاة / 672
Abu Mas'ud al-Ansari reported Allah's Messenger (ﷺ) as saying: The one who is most versed in Allah's Book should act as Imam for the people, but if they are equally versed in reciting it, then the one who has most knowledge regarding Sunnah; if they are equal regarding the Sunnah, then the earliest one to emigrate; it they emigrated at the same time, then the earliest one to embrace Islam. No man must lead another in prayer where (the latter) has authority, or sit in his place of honour in his house, without his permission. Ashajj in his narration used the word, "age" in place of "Islam".
Hadith Referenceصحيح مسلم / كتاب المساجد ومواضع الصلاة / 673
Abu Mas'ud al-Ansari reported: The Messenger of Allah (ﷺ) said to us: The one who is well grounded in Allah's Book and is distinguished among them in recitation should act as Imam for the people. and if they are equally versed in reciting it, then the one who has most knowledge regarding Sunnah; if they are equal regarding the Sunnah, then the earliest one to emigrate; If they emigrated at the same time, then the oldest one in age. No man must lead another in prayer in latter's house or where (the latter) has authority, or sit in his place of honour in his house, except that he gives you permission or with his permission.
Hadith Referenceصحيح مسلم / كتاب المساجد ومواضع الصلاة / 673
Malik bin Huwairith rejected: We came to the Messenger of Allah (ﷺ) and we were all young men of nearly equal age. We stayed with him (the Holy Prophet) for twenty nights, and as the Messenger of Allah (ﷺ) may peace be upon him) was extremely kind and tender of heart, he therefore, thought that we were eager (to see) our family (we felt home-sickness). So he asked us about the members of the family that we had left behind and when we informed him, he said: Go back to your family, stay with them, and teach them (beliefs and practices of Islam) and exhort them to good, and when the time for prayer comes, one amongst you should-announce Adzan and then the oldest among you should lead the prayer.
Hadith Referenceصحيح مسلم / كتاب المساجد ومواضع الصلاة / 674
I came to the Messenger of Allah (ﷺ) along with other persons and we were young men of nearly equal age, and the rest of the hadith was transmitted like the hadith narrated before.
Hadith Referenceصحيح مسلم / كتاب المساجد ومواضع الصلاة / 674
Malik bin Huwairith Abu Sulaiman reported: I came to the Messenger of Allah (ﷺ) along with other persons and we were young men of nearly equal age, and the rest of the hadith was transmitted like the hadith narrated before.
Hadith Referenceصحيح مسلم / كتاب المساجد ومواضع الصلاة / 674