Abu Masud Uqba bin Amr reported,

The Messenger of Allah ﷺ said, "The one who leads a people in prayer should be the most knowledgeable among them in the Book of Allah. If they are equal in their recitation, then the one most learned in the Sunnah. If they are equal in the Sunnah, then the one who emigrated earliest. If they are equal in emigration, then the one who embraced Islam first. A man should not lead another in prayer within his domain of authority, nor sit in his house upon his place of honor without his permission."In another narration, instead of "embraced Islam first," it says "the eldest in age."

Azami 2231

Sahih

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

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

الأعظمي 2231صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Leadership
Section
One who is most deserving of leading the prayer
Numbering
Jami al-Kamil 2231 (2nd edition)
Azami 2231