Abdullah bin Amr bin As reported,

The Messenger of Allah ﷺ said, "Allah does not take away knowledge by snatching it from people, but rather He takes away knowledge by taking the lives of the scholars, until when no scholar remains, people take ignorant ones as their leaders. They are asked questions and give rulings without knowledge, so they go astray and lead others astray."

Ahmad 6787

Sahih

حدثنا وكيع أخبرنا هشام عن أبيه

عن عبد الله بن عمرو قال

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

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