Will Allah erase good deeds on the Day of Judgment for one who looked at forbidden things, and will mountains of good deeds become like a mirage, as mentioned in some hadiths?
Shirk (polytheism) nullifies all good deeds if one does not repent from it, whereas other sins do not nullify all good deeds. There is a difference of opinion as to whether they nullify good deeds to the extent of the sin. If some good deeds are nullified by evil deeds and then repentance occurs, those good deeds return. As for those who watch unlawful things and their good deeds are rendered as scattered dust, these are people who will come on the Day of Resurrection with good deeds like the white mountains of Tihamah, but when they are alone with Allah's prohibitions, they violate them.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/156231