3. Ṣalāh (Ritual Prayer)

٣۔ كِتَابُ الصَّلَاةِ

3.746 [Machine] If the people gather in them the governor

٣۔٧٤٦ بَابُ: إِذَا اجْتَمَعَ الْقَوْمُ فِيهِمُ الْوَالِي

bayhaqi:5317[Chain 1] Abū ʿAbdullāh al-Ḥāfiẓ > Abū Muḥammad ʿAbdullāh b. Jaʿfar b. Darastawayh al-Naḥwī > Muḥammad b. ʿUbaydullāh b. Abū Dāwud al-Munādī > Abū Badr > al-Aʿmash [Chain 2] Abū ʿAbdullāh > Abū ʿAmr b. Abū Jaʿfar > al-Ḥasan b. Sufyān > Abū Bakr b. Abū Shaybah > Abū Khālid al-Aḥmar > al-Aʿmash > Ismāʿīl b. Rajāʾ > Aws b. Ḍamʿaj > Abū Masʿūd al-Anṣārī

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". (Using translation from Muslim 673a)   

البيهقي:٥٣١٧أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ ثنا أَبُو مُحَمَّدٍ عَبْدُ اللهِ بْنُ جَعْفَرِ بْنِ دَرَسْتَوَيْهِ النَّحْوِيُّ ثنا مُحَمَّدُ بْنُ عُبَيْدِ اللهِ بْنِ أَبِي دَاوُدَ الْمُنَادِي ثنا أَبُو بَدْرٍ ثنا الْأَعْمَشُ ح وَأَخْبَرَنَا أَبُو عَبْدِ اللهِ أَخْبَرَنِي أَبُو عَمْرِو بْنُ أَبِي جَعْفَرٍ ثنا الْحَسَنُ بْنُ سُفْيَانَ ثنا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ ثنا أَبُو خَالِدٍ الْأَحْمَرُ عَنِ الْأَعْمَشِ عَنْ إِسْمَاعِيلَ بْنِ رَجَاءٍ عَنْ أَوْسِ بْنِ ضَمْعَجٍ عَنْ أَبِي مَسْعُودٍ الْأَنْصَارِيِّ قَالَ

قَالَ رَسُولُ اللهِ ﷺ يَؤُمُّ الْقَوْمَ أَقْرَؤُهُمْ لِكِتَابِ اللهِ فَإِنْ كَانُوا فِي الْقِرَاءَةِ سَوَاءً فَأَعْلَمُهُمْ بِالسُّنَّةِ فَإِنْ كَانُوا فِي السُّنَّةِ سَوَاءً فَأَقْدَمُهُمْ هِجْرَةً فَإِنْ كَانُوا فِي الْهِجْرَةِ سَوَاءً فَأَقْدَمُهُمْ سِنًّا وَلَا يَؤُمَّنَّ الرَّجُلُ الرَّجُلَ فِي سُلْطَانِهِ وَلَا يَقْعُدُ فِي بَيْتِهِ عَلَى تَكْرِمَتِهِ إِلَّا بِإِذْنِهِ لَفْظُ حَدِيثِهِ عَنْ أَبِي عَمْرٍو  

رَوَاهُ مُسْلِمٌ فِي الصَّحِيحِ عَنْ أَبِي بَكْرِ بْنِ أَبِي شَيْبَةَ