Abdullah bin Amr (may Allah be pleased with them both) said: I heard the Messenger of Allah (peace and blessings be upon him) saying: "Allah does not take away knowledge (by snatching it), rather He takes away the scholars. When no scholar remains, people will take ignorant people as their leaders; they will give fatwas without knowledge, so they will go astray themselves and lead others astray."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20352