The Grand Ayatollah Safi answered a question about the effect of repenting on punishments.
Question: Some of the accused, after their sentences are announced according to either religious law or criminal law, become regretful and repent from their sins; can this repentance cause quashing of the punishment?
The Grand Ayatollah Safi: The mentioned repentance and regret, has no effect in quashing of the punishment; unless the crime is proved with confession which in this condition, the judge can pardon. But concerning the right of God (Haqqullah), repenting before going to the judge causes quashing of the punishment.
source : erfan.ir