Riyad as-Saliheen 663
Ibn 'Umar (May Allah be pleased with them) reported:
The Prophet ﷺ said, "It is obligatory upon a Muslim to listen (to the ruler) and obey whether he likes it or not, except when he is ordered to do a sinful thing; in such case, there is no obligation to listen or to obey."
[Al-Bukhari and Muslim].
وعن ابن عمر رضي الله عنهما عن النبى ﷺ قال: “على المرء المسلم السمع والطاعة فيما أحب وكره، إلا أن يؤمر بمعصية، فإذا أمر بمعصية فلا سمع ولا طاعة” ((متفق عليه))
Classification
Sahih (Authentic)
References
Riyad as-Saliheen 663
Riyad as-Saliheen Book of Miscellany, Hadith 663