The Book on Government (Kitab Al-Imara)

Muslim :: Book 20 : Hadith 4524

It has been narrated on the authority of Abu Huraira that the Messenger of Allah (may peace be upon him) said: It is obligatory for you to listen to the ruler and obey him in adversity and prosperity, in pleasure and displeasure, and even when another person is given (rather undue) preference over you.

Source materials are from the University of Southern California MSA site
Hadith eBooks converted from Imaan Star