It is reported that a man came to ʿAlī – Allāh be pleased with him – and asked,
What do you think about a man who committed a sin?He replied,He must seek Allāh’s forgiveness and repent to Him.[The man] said,He did that, but then sinned again?[ʿAlī] said,He must seek Allāh’s forgiveness and repent to Him.The man again said,He did that, but returned to sin. [ʿAlī] said,He must seek Allāh’s forgiveness and repent to Him.The man said for the fourth time,He did, but then sinned again.ʿAlī then said,Until when?Then he said,He must seek Allāh’s forgiveness and repent to Him; and not give up until it is Shayṭān who is defeated [overcome].
Hunād b. Al-Sarī, Kitāb Al-Zuhd article 910