Sayyiduna Abu Huraira (may Allah be pleased with him) narrated from the Messenger of Allah (peace and blessings be upon him), he (peace be upon him) said: "When Allah intends good for someone, He grants him understanding in the religion."
Hadith Referenceمسند اسحاق بن راهويه / كتاب العلم / 10
Hadith Takhrij«بخاري ، كتاب العلم ، باب من يرد الله به خيراً يفقهه فى الدين ، رقم : 71 ۔ مسلم ، كتاب الزكاة ، باب النهي عن المسالة ، رقم : 1037۔ سنن ترمذي ، رقم : 2645 ۔ سنن ابن ماجه ، رقم : 220 ۔ مسند احمد : 92/4»
Sayyiduna Abu Hurairah (may Allah be pleased with him) narrated from the Messenger of Allah (peace and blessings be upon him), he (peace be upon him) said: "People are like mines of gold and silver in regard to good and evil. So those among them who were the best in the days of ignorance are the best among them in Islam, provided they gain understanding in the religion."
Hadith Referenceمسند اسحاق بن راهويه / كتاب العلم / 11