Abū Hurayrah, who said:
The Messenger of Allah ﷺ said: “A time will come upon people when they will beat the flanks of their camels in search of knowledge…”—and he related the rest of the ḥadīth.
This ḥadīth has a spotless chain and a singular wording. It has been transmitted by several reporters from Sufyān ibn ʿUyaynah.
One version reads: “It is soon that people will beat the flanks of their camels seeking knowledge.”
Another reads: “…from a scholar in Madinah.”
And yet another: “…more learned than the scholar of Madinah.”
Al-Muḥāribī narrated it from Ibn Jurayj as a mawqūf report, while Muḥammad ibn ʿAbd Allāh al-Anṣārī transmitted it from Ibn Jurayj with the chain traced back to the Prophet.
Al-Nasāʾī also recorded it, saying: ʿAlī ibn Aḥmad told us; Muḥammad ibn Kathīr told us; from Sufyān; from Abū al-Zinād; from Abū Ṣāliḥ; from Abū Hurayrah, that the Prophet ﷺ said: “They will beat the flanks of their camels, yet they will find no scholar more learned than the scholar of Madinah.”
Al-Nasāʾī remarked: “This is an error; the correct chain is: from Abū al-Zubayr, from Abū Ṣāliḥ.”
Maʿn ibn ʿĪsā related from Abū al-Mundhir Zuhayr al-Tamīmī that ʿUbayd Allāh ibn ʿUmar reported, from Saʿīd ibn Abī Hind, from Abū Mūsā al-Ashʿarī, who said that the Messenger of Allah ﷺ declared: “People will set out from East and West in search of knowledge, yet they will not find a scholar more learned than the scholar of Madinah.” (1)
It is also narrated from Ibn ʿUyaynah that he said: “I used to think the person intended was Saʿīd ibn al-Musayyib, until I realised that in his time there were also Sulaimān ibn Yasār, Sālim ibn ʿAbd Allāh, and others. Today, however, I say that it is Mālik, for no one comparable to him remains in Madinah.”