Afflictions and the End of the World
Bukhari :: Book 9 :: Volume 88 :: Hadith 178
Narrated Junada bin Abi Umaiya:
We entered upon 'Ubada bin As-Samit while he was sick. We said, "May Allah make you healthy. Will you tell us a Hadith you heard from the Prophet and by which Allah may make you benefit?" He said, "The Prophet called us and we gave him the Pledge of allegiance for Islam, and among the conditions on which he took the Pledge from us, was that we were to listen and obey (the orders) both at the time when we were active and at the time when we were tired, and at our difficult time and at our ease and to be obedient to the ruler and give him his right even if he did not give us our right, and not to fight against him unless we noticed him having open Kufr (disbelief) for which we would have a proof with us from Allah."