Sayyiduna Amr bin Salamah (may Allah be pleased with him) narrates that his father and some people of his tribe came to the Messenger of Allah (peace and blessings be upon him) at the time when people had accepted Islam. They learned the Qur'an and saw to their needs, then they asked the Prophet (peace and blessings be upon him): Who will lead us in prayer? He (peace and blessings be upon him) said: "The one of you who has memorised the most will lead you in prayer" - or he said: "the one who has gathered the most of the Qur'an." So they returned to their people and asked them, and found no one who had memorised more than me, while I was a boy with a wrap on me. So they put me forward and I led them in prayer, or he said: I prayed for them. So I have remained the imam of Banu Jarm until this day of mine. He used to lead them in prayer in their mosque and pray over their funerals.
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 6325