Mishkat al-Masabih
Mishkat al-Masabih 3721
وَعَنْ أَبِي الدَّرْدَاءِ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: " إِنَّ اللَّهَ تَعَالَى يَقُولُ: أَنَا اللَّهُ لَا إِلَهَ إِلَّا أَنَا مَالِكُ الْمُلُوكِ وَمَلِكُ الْمُلُوكِ قُلُوبُ الْمُلُوكِ فِي يَدِي وَإِنَّ الْعِبَادَ إِذَا أَطَاعُونِي حَوَّلْتُ قُلُوبَ مُلُوكِهِمْ عَلَيْهِمْ بِالرَّحْمَةِ وَالرَّأْفَةِ وَإِنَّ الْعِبَادَ إِذَا عَصَوْنِي حَوَّلْتُ قُلُوبَهُمْ بِالسُّخْطَةِ وَالنِّقْمَةِ فَسَامُوهُمْ سُوءَ الْعَذَابِ فَلَا تَشْغَلُوا أَنْفُسَكُمْ بِالدُّعَاءِ عَلَى الْمُلُوكِ وَلَكِنِ اشْغَلُوا أَنْفُسَكُمْ بِالذِّكْرِ وَالتَّضَرُّعِ كَيْ أَكْفِيَكُمْ ملوكَكم «. رَوَاهُ أَبُو نُعَيْمٍ فِي» الْحِلْيَةِ "
Abu al-Darda reported that the Messenger of God said: God Most High says: I am God; there is no god but Me. I am the Sovereign of sovereigns, the King of kings. The hearts of kings are in My hand. When My servants obey Me, I turn the hearts of their kings toward them with mercy and compassion. When My servants disobey Me, I turn their hearts toward them with anger and vengeance, and they make them suffer the worst punishment. So do not occupy yourselves with praying against rulers; occupy yourselves instead with remembrance and humble supplication, and I will suffice you against your rulers. Abu Nuaym transmitted it in al-Hilya.
Translation notes
The translation follows the Arabic as supplied, including its extended divine speech and advice about supplication.