It was narrated from Abu Hurayra raa that in a hadith Qudsi the Prophet (pbuh) said, quoting the Lord, the Sublime and Majestic: ” A man committed a sin and said: “O Lord, forgive me”. Allah, Blessed and Exalted is He, said: “My slave has committed a sin, but he knew that he has a Lord Who forgives sin, and calls people to account for sin.
Then he sinned again and said: ” O Lord, forgive me”. Allah Blessed and Exalted is He, said: ” My slave committed a sin, but he knew that he has a Lord Who forgives and calls people to account for sin”.
Then he sinned again and said: ” O Lord, forgive me”. Allah, Blessed and Exalted is He, said: ” My slave has committed a sin, but he knew that he has a Lord Who forgives sin, and calls people to account for sin. Do what you wish, for I have forgiven you”.
Abdul-A`la said: ” I do not know whether He said after the third or the fourth time: “Do what you wish”. (Muslim, Sahih) (6986) 29 – (2758).