The 'Prophet said, "It is obligatory for one to listen to and obey (the ruler's orders)…

Sahih al-Bukhari Book 56 Hadith 167

Sahih al-Bukhari #2955

Fighting for the Cause of Allah (Jihaad) 56:167

Narrated Ibn `Umar:

The 'Prophet said, "It is obligatory for one to listen to and obey (the ruler's orders) unless these orders involve one disobedience (to Allah); but if an act of disobedience (to Allah) is imposed, he should not listen to or obey it."

Chapter: Listening to and obeying the Imam

Grade: Sahih