Abu Masud Uqba bin Amr reported,

The Messenger of Allah ﷺ said, "The one who leads the people in prayer should be the one most versed in the Book of Allah. If they are equal in recitation, then the one most knowledgeable of the Sunnah. If they are equal in knowledge of the Sunnah, then the one who emigrated earliest. If they are equal in emigration, then the eldest in age. A man is not to lead another in prayer within his domain of authority, nor sit on his place of honor in his house, except with his permission."Mahmud bin Ghaylan said that Ibn Numayr, in his version of the hadith, said, "the one most senior in age."

Tirmidhi 235

Sahih

حدثنا هناد حدثنا أبو معاوية عن الأعمش قال و حدثنا محمود بن غيلان حدثنا أبو معاوية وعبد الله بن نمير عن الأعمش عن إسمعيل بن رجاء الزبيدي عن أوس بن ضمعج قال سمعت

أبا مسعود الأنصاري يقول

قال رسول الله ﷺ يؤم القوم أقرؤهم لكتاب الله فإن كانوا في القراءة سواء فأعلمهم بالسنة فإن كانوا في السنة سواء فأقدمهم هجرة فإن كانوا في الهجرة سواء فأكبرهم سنا ولا يؤم الرجل في سلطانه ولا يجلس على تكرمته في بيته إلا بإذنه قال محمود بن غيلان قال ابن نمير في حديثه أقدمهم سنا

الترمذي 235صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Prayer
Chapter
Who is most deserving of leading the prayer
Numbering
Darussalam 235
Tirmidhi 235