A Supplication for Protection from the Oppression of a Ruler
➊ It is narrated from Abdullah ibn Mas’ud (may Allah be pleased with him) that when any of you fears a king, he should say these words:
اللَّهُمَّ رَبَّ السَّمواتِ السَّبْعِ وَرَبَّ الْعَرْشِ الْعَظِيمِ كُنْ لِى جَارًا مِنْ شَرِّ فَلَانٍ بُنِ فَلَانٍ وَشَرِّ الْجِنِّ وَالْإِنْسِ وَاتَّبَاعِهِمْ أَنْ يَفْرُطَ عَلَيَّ أَحَدٌ مِنْهُمْ عَزَّ جَارُكَ وَجَلَّ ثَنَاؤُكَ وَلَا إِلهُ غَيْرُكَ
[Sahih mawquf (authentic, traced to a Companion): Sahih al-Targhib: 2237, Kitab al-Qada: Chapter on encouragement to say words for one who fears an oppressor, narrated by al-Tabarani]
➋ It is narrated from Ibn Abbas (may Allah be pleased with them both) that when you come to a ruler whose attack you fear, say these words three times:
اللهُ أَكْبَرُ ، اللَّهُ أَعَزُّ مِنْ خَلْقِهِ جَمِيعًا اللهُ أَعَزُّ مِمَّا أَخَافُ وَأَحْذَرُ أَعُوذُ بِاللَّهِ الَّذِي لَا إِلَهَ إِلَّا هُوَ المُمُسِكُ السَّمَوَاتِ أَنْ يَقَعُنَ عَلَى الْأَرْضِ إِلَّا بِإِذْنِهِ مِنْ شَرِّ عَبْدِكَ فَلَانٍ وَجُنُودِهِ وَأَتْبَاعِهِ وَأَشْيَاعِهِ مِنَ الجِنِّ وَالإِنسِ اللَّهُمَّ كُنْ لِى جَارًا مِنْ شَرِّهِمْ جَلَّ ثَنَاؤُكَ وَعَزَّ جَارُكَ وَ تَبَارَكَ اسْمُكَ وَلَا إِلَهَ غَيْرُكَ
[Sahih mawquf (authentic, traced to a Companion): Sahih al-Targhib: 2238, Kitab al-Qada: Chapter on encouragement to say words for one who fears an oppressor; Ibn Abi Shaybah: 9226]
➌ Abu Mijlaz Lahiq ibn Humayd (may Allah be pleased with him) says that whoever fears the oppression of a ruler and says these words:
رَضِيتُ بِاللَّهِ رَبًّا وَبِالْإِسْلَامِ دِينًا وَبِمُحَمَّدٍ نَبِيًّا وَ بِالْقُرْآنِ حَكَمًا وَإِمَامًا
Allah the Exalted will grant him deliverance from him.
[Sahih mawquf (authentic, traced to a Companion): Sahih al-Targhib: 2239, Kitab al-Qada: Chapter on encouragement to say words for one who fears an oppressor, Ibn Abi Shaybah: 9230]