Is it permissible to penalize oneself with specific acts of worship (such as praying 100 rak'ahs or two rak'ahs after ablution) when neglecting an obligation or committing a forbidden act? And does specifying a certain number of rak'ahs constitute a violation? And is there any caveat in saying that this repels Satan and aids in obedience?
It is permissible for a person to discipline themselves with certain acts of obedience and to compel themselves to perform them, based on the legitimacy of following a bad deed with a good one. This is supported by the Qur'anic verse: "Indeed, good deeds do away with evil deeds," and in the Prophetic traditions: "Fear Allah wherever you are, and follow up a bad deed with a good one, it will erase it," and "If you do wrong, then do good." The righteous predecessors applied this principle, such as Ibn Umar, who would spend his night in prayer if he missed the Isha prayer in congregation, and Ibn Wahb, who vowed to fast or give charity if he slandered someone, and Al-Muzani, who would pray a prayer twenty-five times if he missed the congregation, and Ubayd Allah Al-Qawariri, who prayed the 'Atamah (Isha) twenty-seven times to compensate for missing the congregation. There is no objection to this, and it is better to perform good deeds in general, rather than necessarily dedicating a fixed act of worship.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/136208