‘Abdallah b. Mas'ud told of a man coming to the Prophet and saying, “Messenger of God, I sported with a woman on the outskirts of Medina, and I got what I wanted from her short of having intercourse with her. Now here I am, so decide what you wish about me.” ‘Umar said to him, “God has concealed this about you. Would that you had kept it to yourself!” Ibn Mas'ud said that the Prophet gave no reply, so the man got up and went away. Then the Prophet sent a man after him to summon him, and he recited this verse to him. “And observe the prayer at the two ends of the day and the neighbouring parts of the night, for good deeds remove evil deeds. That is a reminder to those who remember (Al-Qur’an, 11:114).” One of the people asked, “Prophet of God, does this refer to him in particular?” He replied, “No, it refers to all men.”
Abu Dharr said that the Prophet went out in winter time when the leaves were falling, and took two branches of a tree whose leaves began to fall. He then addressed Abu Dharr who replied, “At your service, Messenger of God.” He said, “A Muslim observes prayer for God’s sake and his sins fall from him as these leaves fall from this tree.”
‘Amr b. Shu'aib said on his father’s authority that his grandfather reported God’s Messenger as saying, “Command your children to observe prayer when they are seven years old, and beat them for sleep together.”
Abu Dawud transmitted it; and Baghawi transmitted it thus from him in Sharh as-sunna but in al-Masabih from Sabra b. Ma‘bad.