Sayyiduna Abu Huraira (may Allah be pleased with him) narrated from the Noble Prophet (peace and blessings be upon him), he (peace be upon him) said: "People are like mines of gold and silver, those who were best in the pre-Islamic period of ignorance are the best in Islam as well, when they gain understanding (of the religion)."
Hadith Referenceمسند اسحاق بن راهويه / كتاب الفضائل / 554
Hadith Takhrij«بخاري ، كتاب الانبياء ، باب واتخذ ابراهيم خليلا ، رقم : 3352 . مسلم ، كتاب الفضائل ، باب من فضائل يوسف عليه السلام ، رقم : 2378 .»