fiqhsalatimamimamatpriorite
When several people can lead the prayer, the person in authority or the appointed imam comes first, then the host in his home, then the most knowledgeable in the rulings of prayer, then in the Sunna, then in the Quran, then the most devout, then the eldest. In the Maliki school the jurist comes before the best reciter, unlike Abu Hanifa. One avoids appointing someone the people dislike.