Shaykh ul Islam Ibn Taymiyyah, may Allah have mercy on him, said:
Majmoo` al-Fatawa 1:45, 7:487
The punishment for a sin committed by a believer is removed in ten ways:
- He repents to Allah (taubah), so Allah accepts his repentance, for the one who repents from sin is like the one who has no sin.
- He seeks forgiveness from Allah (istighfar), so Allah forgives him.
- He does good deeds that erase his sin for good deeds erase bad ones.
- His believing brethren pray for him or seek forgiveness for his sins during his life or death.
- Or they [ask Allah] to bestow on him as gift from the reward for their deeds, with which Allah benefits him.
- His Prophet Muhammad, sallallahu `alayhi wa sallam, intercedes for him.
- Allah tests him with trials in this world which expiate his sin.
- Allah tests him in al-Barzakh (the intermediate life in the grave, between the death and the Day of Judgment) which expiates his sin.
- Allah tests him in the various stages of the Day of Judgment which expiates his sins.
- Or the Most Merciful of those who have mercy has mercy on him.
Whoever, then, is missed by these ten cannot blame anyone but himself.