Abu Umama Bahili reported,

Two men were mentioned to the Messenger of Allah ﷺ, one a devoted worshipper and the other a scholar. The Messenger of Allah ﷺ said, "The superiority of the scholar over the worshipper is like my superiority over the least among you."Then the Messenger of Allah ﷺ said, "Indeed, Allah, His angels, the inhabitants of the heavens and the earths, even the ant in its hole, and even the fish, send blessings upon the one who teaches people what is good."

Azami 1136

Hasan

عن أبي أمامة الباهلي، قال

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

الأعظمي 1136حسن
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Knowledge
Chapter
Encouragement to seek knowledge
Section
Virtue of the scholar over the worshipper
Numbering
Jami al-Kamil 1136 (2nd edition)
Azami 1136