Riyad as-Salihin, Book 13, Hadith 1392 (In-Book)

'Abdullah bin 'Amr bin Al-'As (May Allah be pleased with them) reported: I heard the Messenger of Allah saying: "Verily, Allah does not take away knowledge by snatching it from the people, but He takes it away by taking away (the lives of) the religious scholars till none of the scholars stays alive. Then the people will take ignorant ones as their leaders, who, when asked to deliver religious verdicts, will issue them without knowledge, the result being that they will go astray and will lead others astray."[Al- Bukhari and Muslim].

وعن عبد الله بن عمرو بن العاص رضي الله عنهما قال‏:‏ سمعت رسول الله صلى الله عليه وسلم يقول‏:‏ ‏"‏إن الله لا يقبض العلم انتزاعًا ينتزعه من الناس ولكن يقبض العلم بقبض العلماء حتى إذا لم يبقِ عالمًا، اتخذ الناس رءوسًا جهالا، فسئلوا فأفتوا بغير علم، فضلوا وأضلوا‏:‏ ‏(‏‏(‏متفق عليه‏)‏‏)‏‏.‏

sunnah.com