وَعَنْ أَبِي هُرَيْرَةَ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «النَّاسُ مَعَادِنُ كَمَعَادِنِ الذَّهَبِ وَالْفِضَّةِ خِيَارُهُمْ فِي الْجَاهِلِيَّةِ خِيَارُهُمْ فِي الْإِسْلَامِ إِذَا فَقِهُوا» . رَوَاهُ مُسلم
Abu Huraira reported God's messenger as saying, “Men are of different origins just as gold and silver are; the best among them in
the pre-Islamic period are the best among them in Islam when they are versed in the religion.” Muslim transmitted it.
Related hadith on this topic