[Machine] The Messenger of Allah ﷺ said, "He who leads the people in prayer should be the one who knows the Qur'an the most. If they are equal in recitation of the Qur'an, then the one who migrated earlier should lead them. If they are equal in migration, then the one who has more understanding of the religion should lead them. If they are equal in religious understanding, then the eldest among them should lead. No man should be appointed leader over his own authority or sit on his own honor without permission." This was narrated by Jarir ibn Hazim from Al-A'mash, and it was narrated by a group from Al-A'mash with the same wording.
قَالَ رَسُولُ اللهِ ﷺ يَؤُمُّ الْقَوْمَ أَكْثَرُهُمْ قُرْآنًا فَإِنْ كَانُوا فِي الْقُرْآنِ وَاحِدًا فَأَقْدَمُهُمْ هِجْرَةً فَإِنْ كَانَتِ الْهِجْرَةُ وَاحِدَةً فَأَكْثَرُهُمْ فِقْهًا فَإِنْ كَانَ الْفِقْهُ وَاحِدًا فَأَكْبَرُهُمْ سِنًّا وَلَا يُؤَمَّنَّ رَجُلٌ فِي سُلْطَانِهِ وَلَا يُجْلَسُ عَلَى تَكْرِمَتِهِ فِي بَيْتِهِ إِلَّا أَنْ يَأْذَنَ لَهُ كَذَا قَالَهُ جَرِيرُ بْنُ حَازِمٍ عَنِ الْأَعْمَشِ وَرَوَاهُ جَمَاعَةٌ عَنِ الْأَعْمَشِ عَلَى اللَّفْظِ الْأَوَّلِ