حَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ، وَهَارُونُ بْنُ عَبْدِ اللَّهِ، قَالاَ حَدَّثَنَا حَجَّاجُ بْنُ مُحَمَّدٍ، قَالَ قَالَ ابْنُ جُرَيْجٍ نَزَلَ ‏{‏ يَا أَيُّهَا الَّذِينَ آمَنُوا أَطِيعُوا اللَّهَ وَأَطِيعُوا الرَّسُولَ وَأُولِي الأَمْرِ مِنْكُمْ‏}‏ فِي عَبْدِ اللَّهِ بْنِ حُذَافَةَ بْنِ قَيْسِ بْنِ عَدِيٍّ السَّهْمِيِّ بَعَثَهُ النَّبِيُّ صلى الله عليه وسلم فِي سَرِيَّةٍ ‏.‏ أَخْبَرَنِيهِ يَعْلَى بْنُ مُسْلِمٍ عَنْ سَعِيدِ بْنِ جُبَيْرٍ عَنِ ابْنِ عَبَّاسٍ ‏.‏
Translation
It has been narrated on the authority of Abu Huraira that the Messenger of Allah (ﷺ) 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.

Comment

The Obligation of Obedience to Rulers

This narration establishes the fundamental Islamic principle of obedience to legitimate Muslim rulers, even when their decisions may appear unfavorable or unjust to individuals. The comprehensive nature of this obligation - encompassing both ease and hardship, preference and neglect - demonstrates the importance Islam places on maintaining social order and preventing civil strife.

Scholarly Commentary

Classical scholars like Imam Nawawi explains that this obedience is required in all matters that do not involve clear disobedience to Allah's commands. The phrase "even when another person is given preference over you" indicates that personal grievances or feelings of injustice do not nullify this obligation.

Ibn Hajar al-Asqalani emphasizes that this ruling applies as long as the ruler maintains Islamic governance and does not command outright disbelief. The wisdom behind this principle is to preserve communal unity and prevent the chaos that results from rebellion against established authority.

Conditions and Limitations

Scholars unanimously agree that obedience to rulers is conditional upon their commands not contradicting clear Islamic injunctions. If a ruler orders something that violates Shariah, then obedience is not due in that specific matter, while maintaining general loyalty to the leadership.

This balanced approach ensures both the preservation of Islamic principles and the stability of Muslim society, reflecting the Prophetic guidance to "hear and obey" except in matters of disobedience to the Creator.