Sayyiduna Abu Hurairah (may Allah be pleased with him) narrates that the Messenger of Allah (peace and blessings be upon him) said: Whoever sits in a gathering in which there is much idle talk, and then before getting up from that gathering, he recites these words: "Subhanaka Rabbana wa bihamdika la ilaha illa anta astaghfiruka thumma atubu ilayk" (Glory is to You, O our Lord! You alone are the true deity, I seek Your forgiveness and then turn to You in repentance), then whatever occurred in that gathering will be forgiven for him.