Hadithcore
Riyad as-Salihin, 1876

Thauban (May Allah be pleased with him) reported:

Whenever the Messenger of Allah (ﷺ) finished his Salat (prayer), he would beg forgiveness three times <b>[by saying, 'Astaghfirullah' (3 times)]</b> and then he would say: "Allahumma Antas-Salamu, wa minkas-Salamu, tabarakta ya Dhal-Jalali wal-Ikram. (O Allah! You are the Bestower of security and security comes from You; Blessed are You. O Possessor of glory and honour)." Imam Al-Auza'i (one of the subnarrators) of this Hadith was asked: "How forgiveness should be sought?" He replied: "I say: Astaghfirullah, Astaghfirullah (I seek forgiveness from Allah. I seek forgiveness from Allah)." <b>[Muslim]</b>.

- وعن ثوبان رضي الله عنه قال‏:‏ كان رسول الله صلى الله عليه وسلم إذا انصرف من صلاته ، استغفر الله ثلاثاً وقال‏:‏ ‏"‏اللهم أنت السلام، ومنك السلام، تباركت يا ياذا الجلال والإكرام‏"‏ قيل للأوزاعي- وهو أحد رواته‏:‏ كيف الإستغفار‏؟‏ قال‏:‏ يقول‏:‏ ‏"‏أستغفر الله ، أستغفر الله‏"‏ ‏(‏‏(‏رواه مسلم‏)‏‏)‏‏.‏

References1 variant
In-Book Reference
Book 19, Hadith 8
Sharh · explanationclick to expand
<b>Guidance from the Hadith:</b><br> 1) After finishing an obligatory prayer, one is recommended to ask for Allah’s forgiveness thrice. This is because any act of worship must necessarily be marred by some deficiency and shortcoming. Hence, we implore Allah Almighty to pardon this.<br> 2) Peace, security, and tranquility are favors from Allah Almighty which He bestows upon those who comply with His Shariah and believe in and obey His Messenger.<br> Note:<br> A certain form of forgiveness-seeking has become common among worshipers in some mosques after the prayer. It says: “Astaghfirullāh Al-‘Azhim al-ladhi lā ilāha illā huwa Al-Hayy Al-Qayyūm wa atūbu ilayh (I seek the forgiveness of Allah, the Magnificent, the One other than Whom there is no god, the Ever-Living, the All-Sustainer, and I repent to Him).” Although its meaning is sound, the Prophet (may Allah’s peace and blessings be upon him) is not reported to have used this form after the obligatory prayers. Rather, he would say, as Al-Awzā‘i made clear after a question about how the Prophet’s forgiveness-seeking was like: “Astaghfirullāh (I ask Allah for forgiveness),” three times. The narrators of the Hadiths are more knowledgeable than others about the Fiqh related to their narration. So, we should adhere to the Prophet’s Sunnah, as it is rich and sufficient and full of blessing and mercy.