[Machine] The Messenger of Allah ﷺ said, "The person who has the most knowledge of the Book of Allah should lead the congregation, and the one who has performed the earliest migration. If they are equal in these aspects, then let the one who has more knowledge of the Sunnah lead them. And if they are equal in all of these, then let the oldest among them lead. No one should lead a group in their authority or sit upon their honorable place in their home without their permission."
قَالَ رَسُولُ اللهِ ﷺ «يَؤُمُّ الْقَوْمَ أَقْرَؤُهُمْ لِكِتَابِ اللهِ وَأَقْدَمُهُمْ هِجْرَةُ فَإِنْ كَانُوا سَوَاءً فَأَعْلَمُهُمْ بِالسُّنَّةِ فَإِنْ كَانُوا فِيهَا سَوَاءً فَأَكْبَرُهُمْ سِنًّا وَلَا يُؤَمُّ رَجُلٌ فِي سُلْطَانِهِ وَلَا يُجْلَسُ عَلَى تَكْرِمَتِهِ فِي بَيْتِهِ إِلَّا بِإِذْنِهِ»