Sunan Abi Dawud Book 2, Hadith 198
when the first emigrants came (to Madina), they stayed at al-‘Asbah (a place near Madina) before the advent of the Messenger of Allah (ﷺ). Salim, the client of Abu Hudhaifah, acted as their imam, as he knew the Qur’an better than all of them, al-Haitham(the narrator) added: and ‘Umar b. al-Khattab and Abu Salamah b. ‘Abd al-Asad were among them.
Messenger of Allah, who will lead us in prayer? He said: The one of you who knows most of the Qur’an, or memorizes most of the Qur’an, (should act as your imam). There was none in the clan who knew more of the Qur’an than I did. They, therefore, put me in front of them and I was only a boy. And I wore a mantle, Whenever I was present in the gathering of Jarm (name of his clan), I would act as their Imam, and lead them in their funeral prayer until today.
Abu Dawud said: This tradition has been narrated by ‘Amr b. Salamah through a different chain of transmitter. This version has: “When my clan visited the Prophet( may peace be upon him) ....” He did not report it on the authority of his father.
When the time of prayer comes, call the Adhan, then call the iqamah, then the one who is oldest of you should act as your imam.
The version narrated by Maslamah goes : He said: On that day we were almost equal in knowledge.
The version narrated by Isma’il says: Khalid said: I said to Abu Qilabah: where is the Qur’an(i.e. why did the Prophet(ﷺ) not say: The one who knows the Qur’an most should act as imam)? He replied: Both of them were equal in the knowledge of the Qur’an.