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.
tabarani:5483ʿAbdullāh b. Nājiyah

[Machine] I was among the first people who went to the Prophet from the people of Ta'if. I left my family in the morning and arrived in Mina around noon. I climbed the mountain and then descended to meet the Prophet. I embraced Islam and he taught me to say, "He is Allah, the One", and "When the earth is shaken with its [final] earthquake". He also taught me to say, "Glory be to Allah, and all praise is for Allah, and there is no deity except Allah, and Allah is the Greatest." He said, "These are the everlasting righteous deeds".  

الطبراني:٥٤٨٣حَدَّثَنَا عَبْدُ اللهِ بْنُ نَاجِيَةَ ثنا مُحَمَّدُ بْنُ سَعْدٍ الْعَوْفِيُّ حَدَّثَنِي أَبِي ثنا عَمِّي الْحُسَيْنُ بْنُ الْحَسَنِ عَنْ يُونُسَ بْنِ نُفَيْعٍ الْجَدَلِيُّ عَنْ سَعْدِ بْنِ جُنَادَةَ قَالَ

كُنْتُ فِي أَوَّلِ مَنْ أَتَى النَّبِيَّ ﷺ مِنْ أَهْلِ الطَّائِفِ فَخَرَجْتُ مِنْ أَهْلِي مِنَ السُّرَاةِ غُدْوَةً فَأَتَيْتُ مِنًى عِنْدَ الْعَصْرِ فَصَاعَدْتُ فِي الْجَبَلِ ثُمَّ هَبَطْتُ فَأَتَيْتُ النَّبِيَّ ﷺ فَأَسْلَمْتُ وَعَلَّمَنِي قُلْ هُوَ اللهُ أَحَدٌ وَإِذَا زُلْزِلَتِ الْأَرْضُ زِلْزَالَهَا وَعَلَّمَنِي هَؤُلَاءِ الْكَلِمَاتِ سُبْحَانَ اللهِ وَالْحَمْدُ لِلَّهِ وَلَا إِلَهَ إِلَّا اللهُ وَاللهُ أَكْبَرُ وَقَالَ «هُنَّ الْبَاقِيَاتُ الصَّالِحَاتُ»  


See similar narrations below:

Collected by Ṭabarānī
tabarani:5482Aḥmad b. al-Ḥusayn b. Mābahrām al-Aydhajī > Muḥammad b. Marzūq

[Machine] I came to the Prophet ﷺ and he taught me the following: When the earth shakes, say "O Disbelievers" and say "He is Allah, the One." He also taught me to say "Subhan Allah" (Glory be to Allah), "Alhamdulillah" (All praise is due to Allah), "La ilaha illa Allah" (There is no god but Allah), and "Allahu Akbar" (Allah is the Greatest). He said, "These are the everlasting good deeds."  

الطبراني:٥٤٨٢حَدَّثَنَا أَحْمَدُ بْنُ الْحُسَيْنِ بْنِ مَابَهْرَامَ الْأَيْذَجِيُّ ثنا مُحَمَّدُ بْنُ مَرْزُوقٍ ثنا سَعْدُ بْنُ مُحَمَّدِ بْنِ الْحَسَنِ بْنِ عَطِيَّةَ بْنِ سَعْدِ بْنِ جُنَادَةَ الْعَوْفِيُّ حَدَّثَنِي عَمِّي الْحُسَيْنُ بْنُ حَسَنِ بْنِ عَطِيَّةَ حَدَّثَنِي قَاضِي بَغْدَادَ يُونُسُ بْنُ نُفَيْعٍ ثنا سَعْدُ بْنُ جُنَادَةَ قَالَ

أَتَيْتُ النَّبِيَّ ﷺ فَعَلَّمَنِي إِذَا زُلْزِلَتِ الْأَرْضُ وَقُلْ يَا أَيُّهَا الْكَافِرُونَ وَقُلْ هُوَ اللهُ أَحَدٌ وَعَلَّمَنِي سُبْحَانَ اللهِ وَالْحَمْدُ لِلَّهِ وَلَا إِلَهَ إِلَّا اللهُ وَاللهُ أَكْبَرُ وَقَالَ «هُنَّ الْبَاقِيَاتُ الصَّالِحَاتُ»