Reference
ID 9118
Collector Muslim ibn al-Hajjaj
Book Sahih Muslim
Chapter The Book on Government
Reference (English Book) Book 20, Hadith 4524
Reference (Arabic Book) Book 34, Hadith 4860
Hadith Type Khabar
Matn (English)

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.

Matn (Arabic)

وَحَدَّثَنَا سَعِيدُ بْنُ مَنْصُورٍ، وَقُتَيْبَةُ بْنُ سَعِيدٍ، كِلاَهُمَا عَنْ يَعْقُوبَ، قَالَ سَعِيدٌ حَدَّثَنَا يَعْقُوبُ بْنُ عَبْدِ الرَّحْمَنِ، عَنْ أَبِي حَازِمٍ، عَنْ أَبِي صَالِحٍ السَّمَّانِ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ عَلَيْكَ السَّمْعَ وَالطَّاعَةَ فِي عُسْرِكَ وَيُسْرِكَ وَمَنْشَطِكَ وَمَكْرَهِكَ وَأَثَرَةٍ عَلَيْكَ ‏"‏ ‏.‏