Abu Hurairah reported,

A hadith traced back to the Prophet ﷺ in which he said, "People are like mines, like mines of silver and gold. The best of them in the days of ignorance are the best of them in Islam, once they gain understanding of the religion. Souls are like assembled troops. Those that recognize one another draw close, and those that fail to recognize one another part ways."

Muslim 6709

Sahih

حدثني زهير بن حرب حدثنا كثير بن هشام حدثنا جعفر بن برقان حدثنا يزيد بن الأصم

عن أبي هريرة

بحديث يرفعه قال الناس معادن كمعادن الفضة والذهب خيارهم في الجاهلية خيارهم في الإسلام إذا فقهوا والأرواح جنود مجندة فما تعارف منها ائتلف وما تناكر منها اختلف

مسلم 6709صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Righteousness, maintaining ties, and good manners
Chapter
One is with those whom he loves
Numbering
Darussalam 6709
Muslim 6709