حَدَّثَنَا أَبُو الْوَلِيدِ الطَّيَالِسِيُّ، حَدَّثَنَا شُعْبَةُ، أَخْبَرَنِي إِسْمَاعِيلُ بْنُ رَجَاءٍ، سَمِعْتُ أَوْسَ بْنَ ضَمْعَجٍ، يُحَدِّثُ عَنْ أَبِي مَسْعُودٍ الْبَدْرِيِّ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏"‏ يَؤُمُّ الْقَوْمَ أَقْرَؤُهُمْ لِكِتَابِ اللَّهِ وَأَقْدَمُهُمْ قِرَاءَةً فَإِنْ كَانُوا فِي الْقِرَاءَةِ سَوَاءً فَلْيَؤُمَّهُمْ أَقْدَمُهُمْ هِجْرَةً فَإِنْ كَانُوا فِي الْهِجْرَةِ سَوَاءً فَلْيَؤُمَّهُمْ أَكْبَرُهُمْ سِنًّا وَلاَ يُؤَمُّ الرَّجُلُ فِي بَيْتِهِ وَلاَ فِي سُلْطَانِهِ وَلاَ يُجْلَسُ عَلَى تَكْرِمَتِهِ إِلاَّ بِإِذْنِهِ ‏"‏ ‏.‏ قَالَ شُعْبَةُ فَقُلْتُ لإِسْمَاعِيلَ مَا تَكْرِمَتُهُ قَالَ فِرَاشُهُ ‏.‏
Translation
Malik b. al-Huwairith said that the Prophet( may peace be upon him) told him or some of his companions

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.