Hadithcore
Riyad as-Salihin, 831

Abu Hurairah (May Allah be pleased with him) reported:

Messenger of Allah (ﷺ) said, "Whoever sits in a gathering and indulges in useless talk and before getting up supplicates: 'Subhanaka Allahumma wa bihamdika, ash-hadu an la ilaha illa Anta, astaghfiruka wa atubu ilaika (O Allah, You are free from every imperfection; praise be to You. I testify that there is no true god except You; I ask Your Pardon and turn to You in repentance),' he will be forgiven for (the sins he may have intentionally or unintentionally committed) in that assembly." <b>[At-Tirmidhi]</b>.

وعن أبى هريرة رضى الله عنه قال‏:‏ قال رسول الله صلى الله عليه وسلم ‏

‏من جلس في مجلس، فكثر فيه لغطه فقال قبل أن يقوم من مجلسه ذلك‏:‏ سبحانك اللهم وبحمدك، أشهد أن لا إله إلا أنت، أستغفرك وأتوب إليك، إلا غفر له ما كان في مجلسه ذلك‏

‏ ((‏‏رَوَاهُ التِّرمِذِيُّ وَقَالَ حَدِيثٌ حَسَنٌ صحيح)).‏

References1 variant
In-Book Reference
Book 4, Hadith 19
Sharh · explanationclick to expand
<b>Guidance from the Hadiths:</b><br> 1) If a person sits in a gathering and engages in a lot of idle talk, he can expiate for that through the reported supplication. A believer should be keen to memorize this supplication, say it in gatherings, and teach it to other attendees.<br> 2) The supplication involves exaltation of Allah Almighty above any imperfection, praise Him for everything, affirmation of His divinity and oneness, and repenting to Him.<br> <br> <b>Benefit:</b><br> This supplication should also be said at the end of pious gatherings, acting like a seal, as indicated in an authentic Hadith narrated by Al-Nasā’i and reported by ‘Ā’ishah (may Allah be pleased with her): “When the Prophet (may Allah’s peace and blessings be upon him) sat in a gathering or offered a prayer, he would utter certain words. I asked him about these words and he replied: ‘If he (a person) has spoken some good words, these will be a seal for them to preserve them until the Day of Resurrection, and if he has spoken otherwise, these will be an expiation for him: Subhānak Allāhumma wa bihamdik, la ilāha illa ant, astaghfiruka wa atūbu ilayk (O Allah, glory and praise be to You. I testify that there is no god but You; I ask Your Pardon and turn to You in repentance).’”
Related hadiths1
Compare isnād across 1 related chains →