Muawiya bin Abu Sufyan reported,

I heard the Prophet ﷺ say, "Whoever Allah wishes good for, He grants him understanding of the religion. I am only a distributor, and Allah is the One who gives. This nation will continue to stand firm upon the command of Allah, unharmed by those who oppose them, until the command of Allah comes to pass."

Azami 1131

Sahih

عن معاوية بن أبي سفيان، قال

سمعت النبي ﷺ يقول: من يرد الله به خيرا يفقه في الدين، وإنما أنا قاسم، والله يعطي، ولن تزال هذه الأمة قائمة على أمر الله لا يضرهم من خالفهم حتى يأتي أمر الله.

الأعظمي 1131صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Knowledge
Chapter
Encouragement to seek knowledge
Section
Virtue of knowledge and understanding of the religion, and encouragement to seek knowledge
Numbering
Jami al-Kamil 1131 (2nd edition)
Azami 1131