I asked the Prophet which action is dearest to God and he replied, “Prayer at its proper time.” I asked what came next, and he replied that it was kindness to parents. I asked what came next and he replied that it was jihad in God's path. He said, “He told me of them, and if I had asked for more he would have told me more.”
‘Ubada b. as-Samit reported God’s Messenger as saying, “Five times of prayer have been prescribed by God. If anyone performs the ablution for them well, observes them at their proper time, and perfectly performs the bowing and showing of submissiveness during them, he has a covenant from God to forgive him; but if anyone does not do so, he has no covenant. If He wills He may forgive him, but if He wills He may punish him.”
Ahmad and Abu Dawud transmitted it, and Malik and Nasa’i transmitted something similar.
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”.