He also reported God’s Messenger as saying, “Tell me, if there were a river at the door of one of you in which he washed five times daily, would any of his filthiness remain?” When he received the reply that none of it would remain, he said, “That is like the five times of prayer by which God obliterates sins.”
Abu Huraira reported God’s Messenger as saying, “The five prayers, Friday to Friday and Ramadan to Ramadan make atonement for what has happened since the previous one when major sins have been avoided.”
Ibn Mas'ud said that a man kissed a woman and came and told the Prophet. Then God revealed, “And observe the prayer at the two ends of the day and the neighbouring parts of the night, for good deeds remove evil deeds (Al- Qur’an, 11:114).”’ The man asked God’s Messenger whether this referred to him, and he replied, “It refers to every one of my whole people.” A version has, “To those of my people who act upon it.”
Anas told of a man who came and said, “Messenger of God, I have done something which merits punishment, so appoint it for me.” He did not question him about it, and when the time for prayer came the man prayed along with him. Then when the Prophet had finished the prayer the man got up and said, “Messenger of God, I have done something which merits punishment, so appoint for me that God has decreed.” He asked, “Did you not pray along with us?” and when he replied that he had, he said, “Well, God has forgiven you your offence, or “your punishment”.