Abu Hurairah reported,

I heard the Messenger of Allah ﷺ say, "A servant committed a sin," with the same meaning as the hadith of Hammad bin Salama. He mentioned three times that the servant committed a sin, and on the third occasion Allah said, "I have forgiven My servant, so let him do as he wishes."

Muslim 6988

Sahih

حدثني عبد بن حميد حدثني أبو الوليد حدثنا همام حدثنا إسحق بن عبد الله بن أبي طلحة قال كان بالمدينة قاص يقال له عبد الرحمن بن أبي عمرة قال فسمعته يقول سمعت

أبا هريرة يقول

سمعت رسول الله ﷺ يقول إن عبدا أذنب ذنبا بمعنى حديث حماد بن سلمة وذكر ثلاث مرات أذنب ذنبا وفي الثالثة قد غفرت لعبدي فليعمل ما شاء

مسلم 6988صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Tawba
Chapter
Acceptance of repentance from sins even if the sins and repentance are repeated
Numbering
Darussalam 6988
Muslim 6988