Ibn Khuzaymah bin Thabit narrates from his father, who said: The Messenger of Allah (peace and blessings be upon him) said: "Whoever has had a prescribed punishment carried out upon him (i.e., he has been punished for a crime), then that sin is forgiven for him." (That is, a person upon whom the prescribed punishment has been carried out becomes purified from that sin.)