Ibn 'Abbas (May Allah be pleased with them) reported:
Messenger of Allah (ﷺ) said, "If a person notices in his ruler what he dislikes, he should show patience because he who departs from the (Muslim) community a cubit, dies like those who died in the Days of Ignorance."[Al-Bukhari and Muslim].
Arabic/English book reference: Book 1, Hadith 672