Hazrat Abu Darda Radhiyallaahu Anhu reports that Nabi Kareem Sallallaahu Alayhi Wasallam said, “Allah Ta’ala says, “I am Allah besides whom there is no Deity, the Master of Kings, King of Kings. Verily the hearts of kings are under My control. When My servants obey me, I turn the hearts of kings and rulers towards them so that they rule over them with mercy and kindness and when My servants disobey Me, I turn the hearts of kings and rulers to treat them harshly, with anger and vengeance. Hence they mete out torture and oppression. So do not occupy yourselves with praying for curses upon kings and instead turn to Me in remembrance and with humanity. And I will preserve you against the tyranny of the kings.”
In another Hadith it has been said: “When Allah Ta’ala desires the well being of a nation, He appoints tolerant, good natured rulers over them. The learned scholars (Ulama) judge their cases (justly and with knowledge). And their wealth lies in the hands of the generous ones (so that all benefit through their generosity). And when Allah Ta’ala desires bad for a nation (because of their wickedness), He appoints fools to rule over them, their ignorant ones judge their cases and their wealth lies in the hands of the stingy ones.”
According to yet another Hadith it is said: “When Allah Ta’ala is angry with a people and the ultimate extreme punishment like the earth caving in upon them, or transfiguration of men into animals does not descend upon them, He causes prices (of commodities) to rise high and rains to be withheld from them and the worst of people are made to rule over them.”
Jabir Radhiyallaahu Anhu reported that: Verily Allah Ta’ala says, “I take revenge against those who have earned My anger and then I shall cast them all into hell.” (Tabrani)
For this reason it has been stated in another Hadith, “Do not curse or swear rulers. Instead pray to Allah Ta’ala for their goodness and their well-being. (Tabrani)
This Hadith indicates that abusing, swearing and cursing the rulers is not going to improve them.
In another Hadith we are told, “Do not occupy yourselves in showering abuse on the rulers and kings. Instead draw near to Allah Ta’ala in prayers for them. Perchance Allah Ta’ala will cause their hearts to turn in kindness towards you.”
Once in the presence of a saintly man someone cursed Hajjaaj, the notorious tyrant. The saint said, “Do not do that. What is happening now is because of your own actions. I fear that if Hajjaaj is dismissed from office or if he dies, monkeys or swines may be made to rule over you.” (Maqaasid-ul- Hasanah)
There is a famous proverb in Arabic meaning, “Your deeds are your rulers.” In other words, as your deeds are, so too will be your rulers.