Abu Hurairah reported,

It was asked, "Messenger of Allah, who is the noblest of people?"He replied, "The most God-fearing of them."They said, "This is not what we are asking you about."He said, "Then it is Yusuf, the prophet of Allah, son of the prophet of Allah, son of the intimate friend of Allah."They said, "This is not what we are asking you about."He said, "Then are you asking me about the lineages of the Arabs? The best of them in the days of ignorance are the best of them in Islam, provided they gain understanding of the religion."

Azami 1205

Sahih

عن أبي هريرة، قال

قيل يا رسول الله، من أكرم الناس؟ قال: أتقاهم. قالوا: ليس عن هذا نسألك. قال: فيوسف نبي الله ابن نبي الله ابن خليل الله. قالوا: ليس عن هذا نسألك. قال: فعن معادن العرب تسألون؟ خيارهم في الجاهلية خيارهم في الإسلام إذا فقهوا.

الأعظمي 1205صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Knowledge
Chapter
Encouragement to seek knowledge
Section
Best of people in the Jahiliyyah are the best of them in Islam if they gain understanding
Numbering
Jami al-Kamil 1205 (2nd edition)
Azami 1205