Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
suyuti:420-73bIbn ʿAbbās > Idhā Atayt Sulṭān Mahīb Takhāf
Request/Fix translation

  

السيوطي:٤٢٠-٧٣b

"عَنِ ابْنِ عَبَّاس قَالَ: إِذَا أَتَيتَ سُلطَانًا مَهِيبًا تَخَافُ أَنْ يَسْطُوَ عَلَيْكَ فَقُلْ: الله أَكبَرُ، الله أَعَزُّ مِنْ خَلقِه جَمِيعًا، الله أَعَزُّ مِمَّا أَخَافُ وَأَحْذَرُ، أَعُوذُ بِالله الَّذِى لَا إِلَهَ إِلَّا هُوَ مُمْسك السَّمَوات السَّبْع أَنْ يَقَعْنَ عَلَى الأَرْض إِلَّا بِإِذْنِهِ مِنْ شَرِّ عَبْدِكَ فُلَانٍ وَجُنُودِهِ وَأَتْبَاعِهِ وَأَشْيَاعِهِ مِنَ الْجِنِّ وَالإِنْسِ، اللَّهُمَّ كُنْ لِى جَارًا مِنْ شرِّهِمْ، جَلَّ ثَنَاؤكُ، وَعَزَّ جَارُكَ، وَتَبَارَكَ اسْمُكَ، وَلَا إِلَهَ غَيْرُكَ، ثَلَاثَ مَرَّاتٍ".  

[ش] ابن أبى شيبة

See similar narrations below:

Collected by Ṭabarānī
tabarani:10599ʿAlī b. ʿAbd al-ʿAzīz > Abū Nuʿaym > Yūnus b. Abū Isḥāq > al-Minhāl b. ʿAmr > Saʿīd b. Jubayr > Ibn ʿAbbās > Idhā Atayt Sulṭān Mahīb Takhāf

[Machine] To protect oneself from being attacked, say "Allahu Akbar, Allah is greater than all His creation. Allah is mightier than what I fear and beware of. I seek refuge in Allah, there is no god but Him. He is the one who holds the heavens and the seven galaxies from falling onto the earth except by His permission. From the evil of your servant, so and so, and his soldiers and followers from the jinn and mankind. O my God, be my protector from their harm. Glorified are You and exalted are Your praise. There is no god but You, three times."  

الطبراني:١٠٥٩٩حَدَّثَنَا عَلِيُّ بْنُ عَبْدِ الْعَزِيزِ ثنا أَبُو نُعَيْمٍ ثنا يُونُسُ بْنُ أَبِي إِسْحَاقَ عَنِ الْمِنْهَالِ بْنِ عَمْرٍو قَالَ حَدَّثَنِي سَعِيدُ بْنُ جُبَيْرٍ عَنِ ابْنِ عَبَّاسٍ قَالَ إِذَا أَتَيْتَ سُلْطَانًا مَهِيبًا تَخَافُ

أَنْ يَسْطُوَ بِكَ فَقُلْ اللهُ أَكْبَرُ اللهُ أَكْبَرُ مِنْ خَلْقِهِ جَمِيعًا اللهُ أَعَزُّ مِمَّا أَخَافُ وَأَحْذَرُ أَعُوذُ بِاللهِ الَّذِي لَا إِلَهَ إِلَّا هُوَ الْمُمْسِكِ السَّمَاوَاتِ السَّبْعَ أَنْ تَقَعْنَ عَلَى الْأَرْضِ إِلَّا بِإِذْنِهِ مِنْ شَرِّ عَبْدِكَ فُلَانٍ وَجُنُودِهِ وَأَتْبَاعِهِ مِنَ الْجِنِّ وَالْإِنْسِ إِلَهِي كُنْ لِي جَارًا مِنْ شَرِّهِمْ جَلَّ ثَنَاؤُكَ وَعَزَّ جَارُكَ وَتَبَارَكَ اسْمُكَ وَلَا إِلَهَ غَيْرُكَ ثَلَاثَ مَرَّاتٍ