وعن ابن مسعود - رضي الله عنه - قال: قال رسول الله - صلى الله عليه وسلم: «مَنْ قَالَ: أَسْتَغْفِرُ اللهَ الَّذِي لاَ إلَهَ إلاَّ هُوَ الحَيَّ القَيُّومَ وَأَتُوبُ إلَيهِ، غُفِرَتْ ذُنُوبُهُ، وإِنْ كانَ قَدْ فَرَّ مِنَ الزَّحْفِ». رواه أبو داود والترمذي والحاكم، وقال: «حديث صحيح على شرط البخاري ومسلم».
It is narrated from Sayyiduna Ibn Mas'ud (may Allah be pleased with him) that he said: The Messenger of Allah (peace and blessings be upon him) said: "Whoever says: 'I seek forgiveness from Allah, besides whom there is no god worthy of worship, the Ever-Living, the Sustainer (of all), and I turn to Him in repentance,' his sins are forgiven, even if he has fled from the battlefield."
(Narrated by Abu Dawud, al-Tirmidhi and al-Hakim, and (al-Hakim) said: This hadith is sahih on the condition of al-Bukhari and Muslim)
Brief Explanation
Ibn Khuzaymah recorded it in (the book) al-Tawakkul from Sayyiduna Ibn Mas'ud (may Allah be pleased with him), as stated in Ithaf al-Maharah (10/438, hadith 13115). As for the narrations of Abu Dawud (1517) and al-Tirmidhi (3577), they are from Sayyiduna Zayd (may Allah be pleased with him), the freed slave of the Prophet (peace and blessings be upon him), as marfu' (attributed to the Prophet).