Riyad as-Salihin 348
Abu Mas'ud 'Uqbah bin 'Amr Al-Badri Al-Ansari (May Allah be pleased with him) reported:
Messenger of Allah (ﷺ) said, "The person who is best versed in the recitation of the Book of Allah, should lead the prayer; but if all those present are equally versed in it, then the one who has most knowledge of the Sunnah; if they are equal in that respect too, then the one who has emigrated (to Al-Madinah) first, if they are equal in this respect also, then the oldest of them. No man should lead another in prayer where the latter has authority, or sit in his house, without his permission". [Muslim] . In another narration in Muslim: Messenger of Allah (ﷺ) said, "One who is senior most in accepting Islam, should lead the Salat (prayer)". Yet another narration is: Messenger of Allah (ﷺ) said, "A man who is well versed in the Book of Allah and can recite it better, should lead the Salat (prayer); if (all those present) are equal in this respect, then the man who is senior most in respect of emigration, if they are equal in that respect too, then the oldest of them should lead the prayer". [Muslim] .
وعن أبي مسعود عقبة بن عمرو البدري الأنصاري رضي الله عنه قال‏:‏ قال رسول الله صلى الله عليه وسلم ‏:‏ ‏"‏يؤم القوم أقرؤهم لكتاب الله، فإن كانوا في القراءة سواء، فأعلمهم بالسنة، فإن كانوا في السنة سواء، فأقدمهم هجرة، فإن كانوا في الهجرة سواء، فأقدمهم سنًا، ولا يؤمن الرجل الرجل في سلطانه، ولا يقعد في بيته على تكرمته إلا بإذنه‏"‏ ‏(‏‏(‏رواه مسلم‏)‏‏)‏‏.‏ 
وفي رواية له‏:‏ ‏"‏فأقدمهم سلمًا‏"‏ بدل ‏"‏سنًا‏"‏ ‏:‏ أو إسلامًا‏.‏
وفي رواية‏:‏ يؤم القوم أقرؤهم لكتاب الله، وأقدمهم قراءة، فإن كانت قراءتهم فيؤمهم أقدمهم هجرة، فإن كانوا في الهجرة سواء، فليؤمهم أكبرهم سنًا‏"‏‏.‏