Abdullah bin Amr bin As reported,

I heard the Messenger of Allah ﷺ say, "Allah does not take away knowledge by snatching it from the people, but He takes away knowledge by taking the souls of the scholars, until when no scholar remains, the people take ignorant leaders. They are asked, and they give rulings without knowledge, so they go astray and lead others astray."

Ahmad 6511

Sahih

حدثني يحيى عن هشام أملاه علينا حدثني أبي سمعت

عبد الله بن عمرو من فيه إلى في يقول

سمعت رسول الله ﷺ يقول إن الله لا يقبض العلم انتزاعا ينتزعه من الناس ولكن يقبض العلم بقبض العلماء حتى إذا لم يترك عالما اتخذ الناس رؤساء جهالا فسئلوا فأفتوا بغير علم فضلوا وأضلوا

أحمد 6511صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abdullah bin Amr bin As
Numbering
Darussalam 6511
Ahmad 6511