Sayyiduna Abu Hurayrah (may Allah be pleased with him) says that the Prophet (peace and blessings be upon him) said: "After me there will be caliphs who will act according to their knowledge and will do what they are commanded; and then there will be rulers who will act without knowledge and will do what they have not been told. Whoever objects (to them) is free (of blame), and whoever restrains his hand remains safe; but (as for) whoever is pleased (with them) and follows them."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قتال أهل البغي / 16618