Judgments (Ahkaam)

Bukhari :: Book 9 :: Volume 89 :: Hadith 258

Narrated 'Abdullah:

The Prophet said, "A Muslim has to listen to and obey (the order of his ruler) whether he likes it or not, as long as his orders involve not one in disobedience (to Allah), but if an act of disobedience (to Allah) is imposed one should not listen to it or obey it. (See Hadith No. 203, Vol. 4)

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