وعن أَبي هريرة - رضي الله عنه - قَالَ: قَالَ رسول الله - صلى الله عليه وسلم: «عَلَيْكَ السَّمْعُ وَالطَّاعَةُ في عُسْرِكَ وَيُسْرِكَ، وَمَنْشَطِكَ وَمَكْرَهِكَ، وَأثَرَةٍ عَلَيْكَ». رواه مسلم.
It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that he said: The Messenger of Allah (peace and blessings be upon him) said: "It is binding on you to listen (to the ruler) and obey, in your hardship and in your ease, in what you are eager for and in what you dislike, and even when others are preferred over you."
(Narrated by Muslim)