Shaykh Ibn ‘Uthaymeen said:
And [regarding the rulers of the Muslims] – from asking Allaah, it is from our right that we ask Allaah for their guidance and success, and that they do what is required [of them].
Unlike some of the people whom we [can only] describe as shamelessly foolish; they say “Don’t pray for the rulers of this time. Don’t say [may] Allaah guide them, [may] Allaah rectify them, [and may] Allaah rectify [the affairs of the nation] by them; never!”, saying “he is not worthy of being prayed for.”
I seek refuge in Allaah [from this foolishness]!
[I ask you] the hearts are in whose hands? [They are of course] in the Hands of Allaah.
[So] pray to Allaah (Ta’aala) for the rulers of Egypt, and for the rulers of Syria, and for the rulers of Jordan and for any ruler; pray to Allaah for all of the rulers – that He rectifies them, that He rectifies the rulers of the Muslims. [In doing so therefore], is there [any] harm? [No], rather, there is benefit.
If Allaah responds to the call (supplication), he will rectify the ruler, either by rectifying his condition, or by replacing him with [someone] better than him without [any] fitnah.
As for him saying “I am not pleased with the action of this ruler, and if I am not pleased with his action, then I will never pray for him” – then, no doubt, this is indeed from foolishness.
And because of this, he [ﷺ] said [about the rulers]:
«Give them their right, and ask Allaah for your right.»
And with what is our right [fulfilled]?
Our right is that he (the ruler) is upright and virtuous.
And from the means to their uprightness and virtue is that we pray to Allaah for them; that we pray to Allaah for them.
And if the people pursued this prophetic guidance, [then] much good will be achieved, and much evil will be averted.