In the Name of Allah, the Gracious, the Merciful
It is permissible for Muslims to pray against wrongdoers on the condition that they do not transgress the limits. This is the lowest level of what is allowed in Islam. At the highest level, Islam recommends that we be patient, forgive our oppressors, and even pray for them to be guided to repentance.
The general rule is that it is not permissible to pray against anyone by name unless that person is a wrongdoer. Muslims may supplicate against someone who has wronged them within limits, such as not asking Allah for excessive punishment or cursing others who have nothing to do with the wrongdoing. This is a ‘concession’ (rukhsa), meaning it is not the best course of action.
Allah said:
لَّا يُحِبُّ اللَّهُ الْجَهْرَ بِالسُّوءِ مِنَ الْقَوْلِ إِلَّا مَن ظُلِمَ وَكَانَ اللَّهُ سَمِيعًا عَلِيمًا إِن تُبْدُوا خَيْرًا أَوْ تُخْفُوهُ أَوْ تَعْفُوا عَن سُوءٍ فَإِنَّ اللَّهَ كَانَ عَفُوًّا قَدِيرًا
Allah does not like negative thoughts to be voiced, except by those who have been wronged. Allah is All-Hearing, All-Knowing. Whether you reveal or conceal a good or pardon an evil, surely Allah is Ever-Pardoning, Most Capable.
Surat al-Nisa’ 4:148
Ibn Abbas, may Allah be pleased with him, explained:
لَا يُحِبُّ اللَّهُ أَنْ يَدْعُوَ أَحَدٌ عَلَى أَحَدٍ إِلَّا أَنْ يَكُونَ مَظْلُومًا فَإِنَّهُ رَخَّصَ لَهُ أَنْ يَدْعُوَ عَلَى مَنْ ظَلَمَهُ وَأَنْ يَصْبِرَ فَهُوَ خَيْرٌ لَهُ
Allah does not like for anyone to supplicate against anyone else, unless they have been wronged. He has granted them a concession to supplicate against his oppressor, but being patient is better for him.
Source: Tafsīr Ibn Abī Ḥātim 4/1100
Al-Hasan al-Basri, may Allah have mercy on him, explained:
مَنْ ظُلِمَ فَقَدْ رُخِّصَ لَهُ أَنْ يَدْعُوَ عَلَى مَنْ ظَلَمَهُ مِنْ غَيْرِ أَنْ يَعْتَدِيَ
Whoever is wronged has been granted a concession to supplicate against his oppressors, but without transgressing the limits.
Source: al-Zuhd li-Hannād 2/513
Imam Ibn al-‘Arabi commented:
رُخِّصَ لَهُ أَنْ يَدْعُوَ عَلَى مَنْ ظَلَمَهُ وَإِنْ صَبَرَ وَغَفَرَ كَانَ أَفْضَلَ لَهُ
A concession is granted to supplicate against one who wronged him, but patience and forgiveness are better for him.
Source: Aḥkām al-Qur’ān li-Ibn al-‘Arabī 1/645
And Shaykh ‘Abdur Rahman al-Sa’di commented:
فإنه يجوز له أن يدعو على من ظلمه ويتشكى منه ويجهر بالسوء لمن جهر له به من غير أن يكذب عليه ولا يزيد على مظلمته ولا يتعدى بشتمه غير ظالمه ومع ذلك فعفوه وعدم مقابلته أولى كما قال تعالى فَمَنْ عَفَا وَأَصْلَحَ فَأَجْرُهُ عَلَى اللَّهِ
It is permissible for him to pray against the one who wronged him, complain about him, and speak ill of the one who spoke ill of him, but without lying about him, adding to his injustice, or transgressing the limit by disparaging another besides his oppressor. However, forgiveness and not confronting him are more appropriate, as Allah Almighty said, ‘But whoever pardons and seeks reconciliation, then their reward is with Allah.’ (42:40)
Source: Tafsīr al-Sa’dī 1/212
The ‘supplication of the oppressed’ is a weapon that Allah grants to the victims of oppression. It is a prayer that will surely be answered as long as it does not contain anything sinful or excessive.
Mu’adh ibn Jabal reported: The Messenger of Allah, peace and blessings be upon him, said:
وَاتَّقِ دَعْوَةَ الْمَظْلُومِ فَإِنَّهُ لَيْسَ بَيْنَهَا وَبَيْنَ اللَّهِ حِجَابٌ
Beware the supplication of the oppressed, for there is no veil between it and Allah.
Source: Ṣaḥīḥ al-Bukhārī 4347, Grade: Muttafaqun Alayhi
In a way, the oppressor has bestowed a free supplication to Allah upon the oppressed believer that is guaranteed to be answered. The believer has the option to use it in retaliation against their oppressors as a punishment, which is permissible but not recommended, or to ask Allah for something better in this life and the Hereafter.
Imam Ahmad ibn Hanbal, may Allah be pleased with him, said:
الدُّعَاءُ قِصَاصٌ وَمَنْ دَعَا عَلَى ظَالِمِهِ فَمَا صَبَرَ
Supplication is a proportional punishment. Whoever supplicates against the one who wronged him, he has not been patient.
Imam Ibn Muflih commented on this statement:
يُرِيدُ بِذَلِكَ أَنَّ الدَّاعِيَ مُنْتَصِرٌ وَالِانْتِصَارُ وَإِنْ كَانَ جَائِزًا لَكِنْ قَالَ تَعَالَى وَلَمَنْ صَبَرَ وَغَفَرَ إِنَّ ذَلِكَ لَمِنْ عَزْمِ الْأُمُورِ … وَإِذَا دَعَا عَلَيْهِ بِمَا آلَمَهُ بِقَدْرِ أَلَمِ ظُلْمِهِ فَهَذَا عَدْلٌ
By that he means the supplicant has retaliated. Retaliation is permissible, but the Almighty said, ‘Whoever endures patiently and forgives, surely this is a resolve to aspire to,’ (42:23) … If one supplicates against the wrongdoer to be hurt by the same amount with which he was hurt by him, that is justice.
Source: al-Furū’ wa Taṣḥīḥ al-Furū’ 10/123
The best prayer of the oppressed is to ask Allah to guide the oppressors to repentance and to stop them from oppressing others, as the angels will return this positive prayer upon the one who said it. This is a supplication in favor of the wrongdoers, which grants the reward of forgiveness to the oppressed and leads to better results.
The Prophet ﷺ frequently prayed for his enemies to be guided, even when they were at war with him.
Abu Huraira reported: It was said, “O Messenger of Allah, pray against the idolaters!” The Messenger of Allah, peace and blessings be upon him, said:
إِنِّي لَمْ أُبْعَثْ لَعَّانًا وَإِنَّمَا بُعِثْتُ رَحْمَةً
Verily, I was not sent to invoke curses, but rather I was only sent as mercy.
Source: Ṣaḥīḥ Muslim 2599, Grade: Sahih
Imam al-Tibi commented:
أَيْ إِنَّمَا بُعِثْتُ لِأُقَرِّبَ النَّاسَ إِلَى اللَّهِ وَإِلَى رَحْمَتِهِ وَمَا بُعِثْتُ لِأُبْعِدَهُمْ عَنْهَا فَاللَّعْنُ مُنَافٍ لِحَالِي فَكَيْفَ أَلْعَنُ
That is, I have only been sent to bring people closer to Allah and His mercy. I have not been sent to push them away from it. Cursing defeats my purpose, so how could I curse?
Source: Sharḥ Mishkāt lil-Ṭībī 12/3705
In another narration, they said, “O Messenger of Allah, the tribe of Daws has disbelieved and rejected you, so pray to Allah against them!” And it was said, “May the tribe of Daws be destroyed!” The Prophet, peace and blessings be upon him, said:
اللَّهُمَّ اهْدِ دَوْسًا وَائْتِ بِهِمْ
O Allah, guide the tribe of Daws and bring them to me.
Source: Ṣaḥīḥ al-Bukhārī 4392, Grade: Muttafaqun Alayhi
And in another narration, it was said, “O Messenger of Allah, the arrows of the tribe of Thaqif have pierced us, so pray against them!” The Messenger of Allah, peace and blessings be upon him, said:
اللَّهُمَّ اهْدِ ثَقِيفًا
O Allah, guide the tribe of Thaqif!
Source: Sunan al-Tirmidhī 3942, Grade: Hasan
In perhaps the most famous example, the Prophet prayed for Umar ibn al-Khattab to be guided to Islam when he was a fierce enemy at the time.
Ibn Umar reported: The Messenger of Allah, peace and blessings be upon him, said:
اللَّهُمَّ أَعِزَّ الْإِسْلَامَ بِأَحَبِّ هَذَيْنِ الرَّجُلَيْنِ إِلَيْكَ بِأَبِي جَهْلٍ أَوْ بِعُمَرَ بْنِ الْخَطَّابِ
O Allah, strengthen Islam with one of two men whom you love more: Abu Jahl or Umar ibn al-Khattab.
Source: Sunan al-Tirmidhī 3681, Grade: Sahih
Allah answered his prayer, then Umar accepted Islam, becoming the second greatest of the Companions after Abu Bakr and the second of the Four Righteous Caliphs. The Ummah benefited greatly from the strength, wisdom, and compassion of Umar, all of which were made possible by the Prophet’s ﷺ prayer for him.
For this reason, Allah and His Messenger ﷺ have commanded excellence in all things and repelling evil with what is better, as He said:
ادْفَعْ بِالَّتِي هِيَ أَحْسَنُ فَإِذَا الَّذِي بَيْنَكَ وَبَيْنَهُ عَدَاوَةٌ كَأَنَّهُ وَلِيٌّ حَمِيمٌ
Respond to evil with what is best, then the one you are in a feud with will be like a close friend.
Surat Fussilat 41:34
Ibn Mas’ud, may Allah be pleased with him, said:
إِذَا رَأَيْتُمُ الرَّجُلَ مِنْكُمْ قَارَفَ ذَنْبًا فَلا تَدْعُوا اللَّهَ عَلَيْهِ وَلَا تَسُبُّوهُ وَلَكِنِ ادْعُوا اللَّهَ أَنْ يُعَافِيَهُ وَأَنْ يَتُوبَ عَلَيْهِ فَإِنَّا كُنَّا إِذَا رَأَيْنَا الرَّجُلَ خُتِمَ لَهُ بِخَيْرٍ رَجَوْنَا لَهُ وَإِذَا خُتِمَ لَهُ بِشَرٍّ خِفْنَا عَلَيْهِ
If you see a man among you seduced into a sin, then neither supplicate to Allah against him nor curse him. Rather, supplicate for Allah to save him and to accept his repentance. When we saw a man do good at the end of his life, we would hope for him. When we saw a man do evil at the end of his life, we would fear for him.
Source: al-Tawbah li-Ibn Abī Dunyā 114
Ma’ruf al-Karkhi, may Allah have mercy on him, was upon the Tigris river as they passed by some people on a boat misbehaving, singing and beating drums. They said to Ma’ruf, “Do you not see these people on the water disobeying Allah Almighty? Pray to Allah against them!” Ma’ruf raised his hands to the sky, saying:
اللهم إلهي وسيدي اللهم إنّي أسألك أن تفرحهم في الآخرة كما فرحتهم في الدنيا
O Allah, my God, my Master! O Allah, I ask You to bring them joy in the Hereafter as You have brought them joy in the world!
One of his companions said, “We asked you to pray against them! We did not ask you to pray for them!” Ma’ruf said:
إذا فرحهم الله في الآخرة تاب عليهم في الدنيا ولم يضركم شيئًا
If Allah brings them joy in the Hereafter, then He has accepted their repentance. It will not harm you at all!
Jesus, the son of Mary, upon him be peace, would say:
إِنَّ الْإِحْسَانَ لَيْسَ أَنْ تُحْسِنَ إِلَى مَنْ أَحْسَنَ إِلَيْكَ إِنَّمَا تِلْكَ مُكَافَأَةٌ بِالْمَعْرُوفِ وَلَكِنَّ الْإِحْسَانَ أَنْ تُحْسِنَ إِلَى مَنْ أَسَاءَ إِلَيْكَ
Verily, goodness is not that you are good to the one who is good to you, for that it only a charitable recompense. Rather, goodness is that you are good to the one who is evil to you.
And Sufyan al-Thawri, may Allah have mercy on him, said:
الْإِحْسَانُ أَنْ تُحْسِنَ إلَى مَنْ أَسَاءَ إلَيْكَ فَإِنَّ الْإِحْسَانَ إلى المُحسِنِ مُتَاجَرَةٌ كَنَقْدِ السُّوقِ خُذْ مِنِّي وَهَاتِ
Excellence is that you are good to the one who is evil to you, for only doing good to a good-doer is merely a transaction like currency in the marketplace. Take from me and give back.
In the case of confronting oppression, the highest level of excellence is to follow the example of the Prophet ﷺ in asking Allah to guide his enemies even as he went into battle to end their injustice.
Imam al-Qarafi explains:
وَأَمَّا الدُّعَاءُ عَلَى الظَّالِمِ فَقَدْ قَالَ مَالِكٌ وَجَمَاعَةٌ مِنْ الْعُلَمَاءِ بِجَوَازِهِ وَالْمُسْتَنَدُ فِي ذَلِكَ قَوْله تَعَالَى وَلَمَنِ انْتَصَرَ بَعْدَ ظُلْمِهِ فَأُولَئِكَ مَا عَلَيْهِمْ مِنْ سَبِيلٍ لَكِنَّ الْأَحْسَنَ الصَّبْرُ وَالْعَفْوُ لِقَوْلِهِ تَعَالَى وَلَمَنْ صَبَرَ وَغَفَرَ إِنَّ ذَلِكَ لَمِنْ عَزْمِ الأُمُورِ أَيْ مِنْ مَعْزُومِهَا وَمَطْلُوبِهَا عِنْدَ اللَّهِ
فَإِنْ زَادَ فِي الْإِحْسَانِ عَلَى ذَلِكَ بِأَنْ دَعَا لَهُ بِالْإِصْلَاحِ وَالْخُرُوجِ عَنْ الظُّلْمِ فَقَدْ أَحْسَنَ إلَى نَفْسِهِ بِمَثُوبَةِ الْعَفْوِ وَتَحْصِيلِ مَكَارِمِ الْأَخْلَاقِ وَإِلَى الْجَانِي بِالتَّسَبُّبِ إلَى إصْلَاحِ صِفَاتِهِ وَإِلَى النَّاسِ بِالتَّسَبُّبِ إلَى كِفَايَتِهِمْ شَرَّهُ فَهَذِهِ ثَلَاثَةُ أَنْوَاعٍ مِنْ الْإِحْسَانِ لَا يَنْبَغِي أَنْ تَفُوتَ اللَّبِيبَ لَا سِيَّمَا وَقَدْ رُوِيَ أَنَّ الْإِنْسَانَ إذَا دَعَا بِمَكْرُوهٍ عَلَى غَيْرِهِ تَقُولُ لَهُ الْمَلَائِكَةُ وَلَك مِثْلُهُ وَإِذَا دَعَا بِخَيْرٍ لِأَحَدٍ تَقُولُ لَهُ الْمَلَائِكَةُ وَلَك مِثْلُهُ
As for supplicating against the oppressor, Imam Malik and a group of scholars said that it is permissible, and the evidence for that is the saying of the Almighty, ‘There is no blame on those who enforce justice after being wronged,’ (42:41). However, patience and forgiveness are best, based on the saying of the Almighty, ‘Whoever endures patiently and forgives, surely this is a resolve to aspire to,’ (42:43). That is, they are among the matters that are determined and sought by Allah.
If he increases his good-doing by supplicating for his oppressor’s reform and for him to abandon injustice, then he has done good to himself by receiving the reward of forgiveness and attaining noble character traits, as well as to the offender by helping him to improve his character and to the people by helping them to avoid his evil. These three types of excellence should not be missed by the intelligent person, especially since it has been narrated that if a person prays for something bad to happen to someone else, the angels say to him, ‘And the same to you,’ and if he prays for something good to someone, the angels say to him, ‘And the same to you.’
Source: al-Furūq lil-Qarāfī 4/292-293
If one’s heart cannot tolerate forgiving the oppressor, it is permissible to pray against them without transgressing the limits. There is no sin or blame in doing so, but it is not acceptable to ask Allah to punish those who have nothing to do with the wrongdoing, to ask Allah for them to commit sins, or to ask Allah for an excessive punishment not befitting the crime.
Imam al-Nafrawi writes:
الدُّعَاءُ عَلَى الظَّالِمِ لَهُ أَحْوَالٌ إمَّا بِعَزْلِهِ لِزَوَالِ ظُلْمِهِ فَقَطْ وَهَذَا حَسَنٌ وَثَانِيهَا بِذَهَابِ أَوْلَادِهِ وَهَلَاكِ أَهْلِهِ وَنَحْوِهِمْ مِمَّنْ لَهُ تَعَلُّقٌ بِهِ وَلَمْ يَحْصُلُ مِنْهُ جِنَايَةٌ عَلَيْهِ وَهَذَا يُنْهَى عَنْهُ لِأَذِيَّتِهِ مَنْ لَمْ يَمُنَّ عَلَيْهِ وَثَالِثُهَا الدُّعَاءُ بِالْوُقُوعِ فِي مَعْصِيَةٍ كَابْتِلَائِهِ بِالشُّرْبِ أَوْ الْغِيبَةِ أَوْ الْقَذْفِ فَيُنْهَى عَنْهُ أَيْضًا لِأَنَّ إرَادَةَ الْمَعْصِيَةِ لِلْغَيْرِ مَعْصِيَةٌ
وَرَابِعُهَا الدُّعَاءُ عَلَيْهِ بِحُصُولِ مُؤْلِمَاتٍ فِي جِسْمِهِ أَعْظَمَ مِمَّا يَسْتَحِقُّهُ فِي عُقُوبَتِهِ فَهَذَا لَا يُتَّجَهُ أَيْضًا لِقَوْلِهِ تَعَالَى فَمَنِ اعْتَدَى عَلَيْكُمْ فَاعْتَدُوا عَلَيْهِ بِمِثْلِ مَا اعْتَدَى عَلَيْكُمْ وَيَخُصُّ تَرْكُهُ لِقَوْلِهِ تَعَالَى وَلَمَنْ صَبَرَ وَغَفَرَ إِنَّ ذَلِكَ لَمِنْ عَزْمِ الأُمُورِ فَفِعْلُهُ جَائِزٌ وَتَرْكُهُ أَحْسَنُ
Supplication against an oppressor has several options: First, for his withdrawal and the removal of his oppression only, and this is good. Second, for the loss of his children, the destruction of his family, and so on for those who are related to the wrongdoer but have not committed a crime against him. This option is prohibited, as it would harm those who have done nothing to him. Third, supplication for him to fall into sin, such as being put to trial with alcohol, backbiting, or slander, in which case it is also forbidden because one wants sin to be where there was none.
Fourth, supplicating against him for bodily harm that is greater than the punishment he deserves is also not appropriate, as Allah Almighty says, ‘If anyone transgresses against you, retaliate in the same manner,’ (2:194). Special mention is made to abandon it altogether, as the Almighty says, ‘Whoever endures patiently and forgives, surely this is a resolve to aspire to,’ (42:43). Thus, doing so is permissible, but leaving it is better.
Source: al-Fawākih al-Dawānī 1/183
The permission to pray against oppressors does not imply one can indulge in wrath against them, as many Muslims mistakenly believe. On the contrary, praying against anyone or cursing them is a serious matter that cannot be taken lightly.
Since praying against anyone is an act of retaliation, those who overdo it may end up wronging the oppressor more so than the original sin, in which case the oppressed will forfeit their good deeds to them at the Reckoning.
Abu Huraira reported: The Messenger of Allah, peace and blessings be upon him, said:
أَتَدْرُونَ مَا الْمُفْلِسُ
Do you know who are bankrupt?
They said, “The one without money or goods is bankrupt.” The Prophet said:
إِنَّ الْمُفْلِسَ مِنْ أُمَّتِي يَأْتِي يَوْمَ الْقِيَامَةِ بِصَلَاةٍ وَصِيَامٍ وَزَكَاةٍ وَيَأْتِي قَدْ شَتَمَ هَذَا وَقَذَفَ هَذَا وَأَكَلَ مَالَ هَذَا وَسَفَكَ دَمَ هَذَا وَضَرَبَ هَذَا فَيُعْطَى هَذَا مِنْ حَسَنَاتِهِ وَهَذَا مِنْ حَسَنَاتِهِ فَإِنْ فَنِيَتْ حَسَنَاتُهُ قَبْلَ أَنْ يُقْضَى مَا عَلَيْهِ أُخِذَ مِنْ خَطَايَاهُمْ فَطُرِحَتْ عَلَيْهِ ثُمَّ طُرِحَ فِي النَّارِ
Verily, the bankrupt of my nation are those who come on the Day of Resurrection with prayers, fasting, and charity, but also with insults, slander, consuming wealth, shedding blood, and beating others. The oppressed will each be given from his good deeds. If his good deeds run out before justice is fulfilled, then their sins will be cast upon him and he will be thrown into the Hellfire.
Source: Ṣaḥīḥ Muslim 2581, Grade: Sahih
Imam al-Ghazali commented:
وَيَقْرُبُ مِنَ اللَّعْنِ الدُّعَاءُ عَلَى الْإِنْسَانِ بِالشَّرِّ حتى الدعاء على الظالم كقول الإنسان مثلاً لا صحح الله جسمه ولا سلمه الله وما يجري مجراه فإن ذلك مَذْمُومٌ وَفِي الْخَبَرِ إِنَّ الْمَظْلُومَ لَيَدْعُو عَلَى الظالم حتى يكافئه ثم يبقى للظالم عنده فضلة يوم القيامة
Close to cursing is supplicating for evil against a person, even supplication against a wrongdoer, such as asking Allah to never give them bodily health or peace, and so on, for that is reprehensible. In the narrations, the oppressed will continue to supplicate against the wrongdoer until he is sufficiently recompensed. What is beyond that is a surplus in favor of the wrongdoer on the Day of Resurrection.
Source: Iḥyā’ Ulūm al-Dīn 3/126
Transgression in supplication against oppressors or enemies can potentially backfire if it is excessive, which is why the wise Muslim is prudent and measured if they retaliate by supplication.
As such, the Prophet ﷺ and the Salaf suggested asking Allah to remove the harm, rather than to harm the wrongdoers. Asking Allah for help is better than asking Allah to harm someone else, even if that were justified. If you only ask Allah to harm the oppressor, how does that benefit you in the Hereafter?
Aisha reported: Something was stolen from her, so she began to supplicate against the thief. The Messenger of Allah, peace and blessings be upon him, said:
لَا تُسَبِّخِي عَنْهُ
Do not lighten his sin.
Source: Sunan Abī Dāwūd 4909, Grade: Sahih
Al-Hasan al-Basri, may Allah have mercy on him, explained:
لَا يدعُ عَلَيْهِ وَلْيَقُلْ اللَّهُمَّ أَعِنِّي عَلَيْهِ وَاسْتَخْرِجْ حَقِّي مِنْهُ
Do not supplicate against the wrongdoer, but rather say, ‘O Allah, help me and return what he owes me!’
Source: Tafsīr Ibn Kathīr 4:138
A horse was stolen from Al-Rabia’, may Allah have mercy on him, so the people with him said, “Pray to Allah Almighty against him!” Al-Rabia’ said:
بَلْ أَدْعُو اللَّهَ عَزَّ وَجَلَّ لَهُ اللَّهُمَّ إِنْ كَانَ غَنِيًّا فَأَقْبِلْ بِقَلْبِهِ وَإِنْ كَانَ فَقِيرًا فَأَغْنِهِ
No, rather I will pray for him, ‘O Allah, if he was rich, turn his heart. If he was poor, enrich him.’
Source: al-Zuhd li-Aḥmad Ibn Ḥanbal 1970
Muslim ibn Yasar, may Allah have mercy on him, heard a man supplicating against another man who wronged him, so he said:
كِلِ الظَّالِمَ إِلَى ظُلْمِهِ فَإِنَّهُ أَسْرَعُ إِلَيْهِ مِنْ دُعَائِكَ عَلَيْهِ إِلَّا أَنْ يَتَدَارَكَهُ بِعَمَلٍ وَقَمِنٌ أَنْ لَا يَفْعَلَ
Leave the wrongdoer in the liability of his wrongdoing, for that is faster to act against him than your supplication against him, unless he resolves it with a good deed but he is unlikely to do so.
Source: al-Zuhd li-Aḥmad ibn Ḥanbal 2300
Furthermore, prayer against an oppressor could potentially fall into the major sin of backbiting if it is exaggerated, in which case, this backbiting benefits the wrongdoers. It is more appropriate for believers to be more concerned about their own sins than about the sins of others.
Ibn Sirin, may Allah be pleased with him, heard a man cursing the tyrant Al-Hajjaj, so he said:
مَهْ أَيُّهَا الرَّجُلُ إِنَّكَ لَوْ وَافَيْتَ الْآخِرَةَ كَانَ أَصْغَرُ ذَنْبٍ عَمِلْتَهُ قَطُّ أَعْظَمَ عَلَيْكَ مِنْ أَعْظَمِ ذَنْبٍ عَمِلَهُ الْحَجَّاجُ وَاعْلَمْ أَنَّ اللَّهَ حَكَمٌ عَدْلٌ إِنْ أَخَذَ مِنَ الْحَجَّاجِ لِمَنْ ظُلِمَ شَيْئًا فَسَيَأْخُذُ لِلْحَجَّاجِ مِمَّنْ ظَلَمَهُ فَلَا تَشْغَلَنَّ نَفْسَكَ بِسَبِّهِ
Calm down, sir! When you arrive in the Hereafter, the smallest sins you committed will be worse for you than the greatest sins committed by Al-Hajjaj. Know that Allah judges with justice! If He takes something away from Al-Hajjaj because of his wrongdoing, He also gives back to Al-Hajjaj because he was wronged, so do not busy yourself with cursing him.
Imam al-Qushayri commented:
قيل يؤتى العبد يَوْم الْقِيَامَة كتابه فلا يرى فِيهِ حسنة فَيَقُول أين صلاتي وصيامي وطاعاتي فيقال ذهب عملك كُلهُ باغتيابك لِلنَّاسِ
It is said that a servant will receive his book of deeds on the Day of Resurrection and he will not see any good in it. He will say, ‘Where are my prayers? Where is my fasting? Where are my acts of obedience?’ It will be said, ‘All of your good deeds have been lost because you were backbiting against people.’
Source: al-Risālah al-Qushayrīyah 1/291
The Prophet ﷺ rarely prayed against his enemies, as he would more often pray for them because he wanted them to be guided to Islam.
On one occasion, he was publicly praying against four specific idolaters by name, who were the leaders of injustice, but Allah revealed the verse commanding him to stop this practice.
Ibn Umar reported: The Messenger of Allah, peace and blessings be upon him, raised his head from the last bowing in dawn prayer, saying:
اللَّهُمَّ الْعَنْ فُلَانًا وَفُلَانًا وَفُلَانًا
O Allah, curse this person, and this person, and this person.
Then, Allah revealed the verse:
لَيْسَ لَكَ مِنَ ٱلْأَمْرِ شَىْءٌ أَوْ يَتُوبَ عَلَيْهِمْ أَوْ يُعَذِّبَهُمْ فَإِنَّهُمْ ظَـٰلِمُونَ
You have no say in the matter. It is up to Allah to turn to them in mercy or punish them, for they are surely wrongdoers. (3:128)
Source: Ṣaḥīḥ al-Bukhārī 4559, Grade: Sahih
Shaykh al-Islam Ibn Taymiyyah commented:
وَأَمَّا الدُّعَاءُ عَلَى مُعَيَّنِينَ كَمَا كَانَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَلْعَنُ فُلَانًا وَفُلَانًا فَهَذَا قَدْ رُوِيَ أَنَّهُ مَنْسُوخٌ بِقَوْلِهِ لَيْسَ لَكَ مِنَ الْأَمْرِ شَيْءٌ … وَذَلِكَ لِأَنَّ الْمُعَيَّنَ لَا يَعْلَمُ إنْ رَضِيَ اللَّهُ عَنْهُ أَنْ يَهْلِكَ بَلْ قَدْ يَكُونُ مِمَّنْ يَتُوبُ اللَّهُ عَلَيْهِ
As for supplicating against a specific individual by name, as the Prophet had cursed this person or that person, it has been narrated that it is abrogated by His saying, ‘You have no say in the matter…’ (3:128). That is because it is not known if Allah will be pleased by a specific person’s destruction. Rather, their repentance might be accepted by Allah.
Source: Majmū’ al-Fatāwá 8/335
And Shaykh Salih Ali al-Shaykh writes:
القول الثاني وهو الصحيح أنَّ الكافر أيضا لا يُلْعَنْ بعينه … إنَّ النبي صلى الله عليه وسلم لم يلعن كافرا بعينه إلا هؤلاء ونزل فيهم قول الله لَيْسَ لَكَ مِنْ الْأَمْرِ شَيْءٌ لهذا قال طائفة من العلماء إنّ لعن الكافر المعين منسوخ بهذه الآية
The second opinion, which is correct, is that the unbelievers are also not cursed by name… The Prophet never cursed an unbeliever by name, except for these few, until the verse was revealed about them, ‘You have no say in the matter…’ (3:128). For this reason, a group of scholars said cursing an unbeliever by name has been abrogated by this verse.
Source: Sharḥ al-‘Aqīdah al-Ṭaḥāwīyah 1/214
After this event, the Prophet ﷺ would not pray against specific people by name, but only by their general characteristics, as Allah said:
أَلَا لَعْنَةُ اللَّهِ عَلَى الظَّالِمِينَ
Surely, Allah’s condemnation is upon the wrongdoers.
Surat al-Hud 11:18
Imam Ahmad ibn Hanbal, one of the Four Great Imams, discouraged Muslims from cursing people by name, even if they were the worst of wrongdoers.
A man mentioned the tyrant Al-Hajjaj in front of Imam Ahmad, may Allah be pleased with him, saying, “Let him be cursed!” Ahmad said:
لَا يُعْجِبُنِي لَوْ عَبَّرَ
I do not like for it to be uttered.
Then, Ahmad said:
أَلَا لَعْنَةُ اللَّهِ عَلَى الظَّالِمِينَ
Surely, Allah’s condemnation is upon the wrongdoers.
Surat al-Hud 11:18
Shaykh al-Islam Ibn Taymiyyah commented:
وَالْمَعْرُوفُ عَنْ أَحْمَدَ كَرَاهَةُ لَعْنِ الْمُعَيَّنِ كَالْحَجَّاجِ بْنِ يُوسُفَ وَأَمْثَالِهِ وَأَنْ يَقُولَ كَمَا قَالَ اللَّهُ تَعَالَى أَلَا لَعْنَةُ اللَّهِ عَلَى الظَّالِمِينَ
Ahmad is known to have disapproved of cursing specific people by name, such as Al-Hajjaj ibn Yusuf and their likes, but rather he would say as Allah Almighty said, ‘Surely, the curse of Allah is upon the wrongdoers.’ (11:18)
Source: Minhāj al-Sunnah 4/569
Cursing people who sin by their general characteristics, but not by naming them, is an effective way of warning them about their evil deeds, while simultaneously protecting oneself from the consequences of transgressing the limits.
The Companions and the Salaf would likewise rarely curse those who oppressed them. Instead, they would appeal to Allah for help in a general way, or if they did mention the wrongdoer by name, they would seek refuge in Allah rather than asking Allah to destroy them.
Ibn Abbas, may Allah be pleased with him, said:
إِذَا أَتَيْتَ سُلْطَانًا مَهِيبًا تَخَافُ أَنْ يَسْطُوَ عَلَيْكَ فَقُلْ اللَّهُ أَكْبَرُ اللَّهُ أَعَزُّ مِنْ خَلْقِهِ جَمِيعًا اللَّهُ أَعَزُّ مِمَّا أَخَافُ وَأَحْذَرُ أَعُوذُ بِاللَّهِ الَّذِي لَا إِلَهَ إِلَّا هُوَ الْمُمْسِكُ السَّمَاوَاتِ السَّبْعِ أَنْ يَقَعْنَ عَلَى الْأَرْضِ إِلَّا بِإِذْنِهِ مِنْ شَرِّ عَبْدِكَ فُلَانٍ وَجُنُودِهِ وَأَتْبَاعِهِ وَأَشْيَاعِهِ مِنَ الْجِنِّ وَالْإِنْسِ اللَّهُمَّ كُنْ لِي جَارًا مِنْ شَرِّهِمْ جَلَّ ثَنَاؤُكَ وَعَزَّ جَارُكَ وَتَبَارَكَ اسْمُكَ وَلَا إِلَهَ غَيْرُكَ ثَلَاثَ مَرَّاتٍ
If an imposing ruler comes to you and you fear he will pillage you, then say three times, ‘Allah is the greatest! Allah is more powerful than all His creation together! Allah is mightier than what I fear and worry! I seek refuge in Allah, there is no God but Him, the Holder of the seven heavens lest they fall upon the earth but by His permission, from the evil of Your servant, this man, his soldiers, his followers, and his partisans among jinn and humanity! O Allah, be my protector from his evil, for majestic is Your praise, mighty is Your protection, and blessed is Your name. There is no God besides You!’
Source: Muṣannaf Ibn Abī Shaybah 29177, Grade: Sahih
Umar ibn al-Khattab, may Allah be pleased with him, famously supplicated against the Muslims’ enemies by their characteristics, but not by their names:
اللَّهُمَّ اغْفِرْ لَنَا وَلِلْمُؤْمِنِينَ وَالْمُؤْمِنَاتِ وَالْمُسْلِمِينَ وَالْمُسْلِمَاتِ وَأَلِّفْ بَيْنَ قُلُوبِهِمْ وَأَصْلِحْ ذَاتَ بَيْنِهِمْ وَانْصُرْهُمْ عَلَى عَدُوِّكَ وَعَدُوِّهِمْ اللَّهُمَّ الْعَنْ كَفَرَةَ أَهْلِ الْكِتَابِ الَّذِينَ يَصُدُّونَ عَنْ سَبِيلِكَ وَيُكَذِّبُونَ رُسُلَكَ وَيُقَاتِلُونَ أَوْلِيَاءَكِ اللَّهُمَّ خَالِفْ بَيْنَ كَلِمَتِهِمْ وَزَلْزِلْ أَقْدَامَهُمْ وَأَنْزِلْ بِهِمْ بَأْسَكَ الَّذِي لا تَرُدُّهُ عَنِ الْقَوْمِ الْمُجْرِمِينَ بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ اللَّهُمَّ إِنَّا نَسْتَعِينُكَ وَنَسْتَغْفِرُكَ وَنُثْنِي عَلَيْكَ وَلا نَكْفُرُكَ وَنَخْلَعُ وَنَتْرُكُ مَنْ يَفْجُرُكَ بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ اللَّهُمَّ إِيَّاكَ نَعْبُدُ وَلَكَ نُصَلِّي وَنَسْجُدُ وَلَكَ نَسْعَى وَنَحْفِدُ وَنَخْشَى عَذَابَكَ الْجِدَّ وَنَرْجُو رَحْمَتِكَ إِنَّ عَذَابَكَ بِالْكَافِرِينَ مُلْحِقٌ
O Allah, forgive the believing men and believing women and the Muslim men and Muslim women, bring their hearts together and reconcile between them, support them against Your enemies and their enemies. O Allah, the curse is upon those who disbelieved among the People of the Book, who obstruct people from Your path and have denied Your Messenger and have fought Your allies. O Allah, oppose their words and shake their footing and send upon them Your strength which the criminals cannot repel. In the name of Allah, the Gracious, the Merciful, we seek Your help and we seek Your forgiveness. We praise You, we do not deny You, and we disavow and abandon whoever is wicked to You. In the name of Allah, the Gracious, the Merciful, You alone we worship, we pray to You, we prostrate for You, we strive for You, we fear Your punishment and we hope in Your mercy. Verily, Your punishment of the unbelievers will be carried out.
Source: al-Sunan al-Kubrá lil-Bayhaqī 3143, Grade: Sahih
In these examples, the Companions would pray against wrongdoers by mentioning their general characteristics, but without naming them individually. If they did name individuals, their requests from Allah were measured and never excessive, beeseching Allah for protection from them rather than their damnation.
Regardless, it is never permissible to ask Allah to condemn anyone to Hell or for them to remain as unbelievers. This defeats the purpose of Islam, which is to guide humanity back to the worship of Allah alone. Indeed, those who wish for people to enter Hell have the same desire as Satan!
Samurah ibn Jundab reported: The Messenger of Allah, peace and blessings be upon him, said:
لَا تَلَاعَنُوا بِلَعْنَةِ اللَّهِ وَلَا بِغَضَبِهِ وَلَا بِالنَّارِ
Do not curse each other with the curse of Allah, nor invoke His wrath, nor invoke the Hellfire.
Source: Sunan al-Tirmidhī 1976, Grade: Sahih
Imam Ibn ‘Allan commented:
وقوله ولا بغضبه ولا بالنار أي ولا يدعو أحدكم على أحد بكل منهما وذلك لعظم شأنهما
His saying ‘nor invoke His wrath, nor invoke the Hellfire’ means none of you should supplicate against anyone with either of these, for they are the most enormous matters.
Source: Dalīl al-Fāliḥīn 8/396
Imam al-Tibi commented:
أي لا تدعو الناس بما يبعدهم من الله تعالى ومن رحمته إما صريحا أو كناية
That is, do not supplicate against people with what will distance them from Allah Almighty and His Mercy, whether explicitly or implicitly.
Source: Sharḥ Mishkāt lil-Ṭībī 10/3127
Imam al-Munawi commented:
أي لا يقول أحدكم اللهم اجعله من أهل النار ولا احرقه بنار جهنم
That is, do not let anyone say, ‘O Allah, make him among the people of Hellfire,’ nor say, ‘May he be burned in the fires of Hell!’
Source: Fayḍ al-Qadīr 6/420
Imam al-San’ani commented:
لا يدعوا أحدكم على الآخر أن يكون من أهل النار
No one should pray for anyone else to be among the people of Hellfire.
Source: al-Tanwīr Sharḥ al-Jāmi’ al-Ṣaghīr 11/139
And Imam Ibn Muflih writes:
وَإِنْ اعْتَدَى فِي الدُّعَاءِ كَمَنْ يَدْعُو بِالْكُفْرِ عَلَى مَنْ شَتَمَهُ أَوْ أَخَذَ مَالَهُ فَذَلِكَ سَرَفٌ مُحَرَّمٌ
It is transgression in supplication for one to wish unbelief upon another who insulted him or took his wealth, for that is exaggeration and forbidden.
Source: al-Furū’ wa Taṣḥīḥ al-Furū’ 10/123
Retaliation in Islam has to be within the limits set by Allah. It cannot contain anything inherently sinful like slander, treachery, or malice. This applies to all types of retaliation, whether legal, social, or in prayer.
Imam al-Ba’li writes:
ولا يجوزُ أن يكذبَ على مَن كذَبَ عليه ولا يشهدَ بزورٍ على من شهِد عليه بزورٍ ولا يُكفِّرَه بالباطلِ كما كفَّره بالباطلِ ولا يقذِفَه كذبًا كما قذَفَه كذبًا ولا يفجُرَ إذا خاصَمَه كما فجر هو فكذلك لا يجوزُ له أن يغدرَ في عقدٍ عقده بينهما لأجلِ كونِه غدره فلا يخونُه كما خانه، والشارعُ نهى عن الخيانةِ لمن خان ولم يجعلْه قِصاصًا فلا يأخذُ من مالِه بغيرِ علمِه بقدرِ ما أخَذَه هو وهذا أصحُّ قولَيِ العلماءِ
It is not permissible for him to lie about someone who lied about him, nor to bear false witness against someone who bore false witness against him, nor to falsely declare him an unbeliever as he falsely declared him an unbeliever, nor to slander him as he slandered him, nor to be wicked if he argues with him as he is wicked. Likewise, it is not permissible for him to betray a contract he made between them because of his betrayal, so he should not defraud him as he defrauded him. The Lawgiver forbade betrayal of someone who betrayed him and did not appoint it as a form of retaliation, so he should not take from his money without his knowledge in the amount that he took. This is the sounder opinion of the scholars.
Source: Mukhtaṣar al-Fatāwá al-Miṣrīyah 2/488
Some people misinterpret the stories of the Prophets in the Quran to justify transgression in their supplications. They specifically cite the story of Noah, upon him be peace, when he prayed for all of the unbelievers to be destroyed.
However, the whole context of his story reveals that such a supplication is not permissible in normal circumstances. Noah first preached Islam to his people for nine hundred and fifty years, demonstrating an incredibly long period of forbearance.
Allah said:
وَلَقَدْ أَرْسَلْنَا نُوحًا إِلَىٰ قَوْمِهِ فَلَبِثَ فِيهِمْ أَلْفَ سَنَةٍ إِلَّا خَمْسِينَ عَامًا فَأَخَذَهُمُ الطُّوفَانُ وَهُمْ ظَالِمُونَ
Verily, We sent Noah to his people, and he remained among them for a thousand years, less fifty. Then, the Flood overtook them while they persisted in wrongdoing.
Surat al-‘Ankabut 29:14
During these centuries, they would viciously assault Noah, but he would respond by asking Allah to forgive them and guide them. The Messenger of Allah ﷺ followed Noah’s example when he was injured during the battle of Uhud, and it is also reported in the Gospel text that Jesus, upon him be peace, did the same as well.
‘Ubayd ibn ‘Umayr reported: They used to beat and strangle Noah, upon him be peace, until he fainted. When he woke up, Noah said:
اللَّهُمَّ اغْفِرْ لِقَوْمِي فَإِنَّهُمْ لَا يَعْلَمُونَ
O Allah, forgive my people for they do not know.
Source: Tafsīr Ibn Abī Ḥātim 7:59
Al-Qadi ‘Iyad commented:
وقد روى مثل هذا القول عن نبينا صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ يوم أحد فيه ما كانوا عليه صلوات الله عليهم من الحلم والصبر والشفقة على قومهم وأممهم وأنهم مع فعلهم بهم وأذاهم لهم دعوا بالغفران وعذروهم بالجهل وقلة العلم بما أتوه
A similar statement was narrated from our Prophet on the day of Uhud. In this is their forbearance, patience, and compassion for their peoples and nations, that despite what they did to them and how they hurt them, they prayed for their forgiveness and excused them for their ignorance, as they had only been given a little knowledge.
Source: Ikmāl al-Mu’lim bi-Fawā’id Muslim 6/164
After decades and even centuries of graceful patience, Allah revealed to Noah that none of them would accept faith anymore. Only after Allah informed him about this did he ask Allah to destroy them all.
Allah said:
وَقَالَ نُوحٌ رَّبِّ لَا تَذَرْ عَلَى الْأَرْضِ مِنَ الْكَافِرِينَ دَيَّارًا إِنَّكَ إِن تَذَرْهُمْ يُضِلُّوا عِبَادَكَ وَلَا يَلِدُوا إِلَّا فَاجِرًا كَفَّارًا
Noah had prayed, ‘My Lord! Do not leave a single disbeliever on earth. For if You spare them, they will certainly mislead Your servants, and give birth only to wicked sinners, staunch disbelievers.’
Surat Nuh 71:26-27
Allah permitted Noah to offer this prayer due to his specific circumstances, but it is not permissible for anyone else.
Imam al-Qurtubi commented:
وَقَدِ اسْتَشْكَلَ بَعْضُ النَّاسِ هَذِهِ الْآيَةَ فَقَالَ كَيْفَ دَعَا عَلَيْهِمْ وَحُكْمُ الرُّسُلِ اسْتِدْعَاءُ إِيمَانِ قَوْمِهِمْ فَالْجَوَابُ أَنَّهُ لَا يَجُوزُ أَنْ يَدْعُوَ نَبِيٌّ عَلَى قَوْمِهِ إِلَّا بِإِذْنٍ مِنَ اللَّهِ وَإِعْلَامٍ أَنَّهُ لَيْسَ فِيهِمْ مَنْ يُؤْمِنُ وَلَا يَخْرُجُ مِنْ أَصْلَابِهِمْ مَنْ يُؤْمِنُ دَلِيلُهُ قَوْلُهُ لِنُوحٍ عَلَيْهِ السَّلَامُ
Some people have questioned this verse, saying, ‘How could he have called down a curse upon them, when the ruling of the Messengers is to call people to have faith?’ The answer is that it is not permissible for a Prophet to call down a curse upon his people except with permission from Allah, and with knowledge that there is no one among them who believes and no one from their progeny will believe. The evidence for this is His statement to Noah, upon him be peace, ‘None of your people will believe except those who already have.’ (11:36)
Source: Tafsīr al-Qurṭubī 8/375
Yet, even though Noah was allowed to supplicate for their destruction and he committed no sin in doing so, he still felt uneasy about it. Allah did not command him or recommend for him to pray in this manner; it was merely permissible for him.
Thus, Noah viewed his supplication as a shortcoming on his part, to the extent that he would be too ashamed to intercede with Allah for the believers on the Day of Judgment. When people seek intercession from the Prophets before the Reckoning, Noah will say:
وَإِنَّهُ قَدْ كَانَتْ لِي دَعْوَةٌ دَعَوْتُهَا عَلَى قَوْمِي نَفْسِي نَفْسِي نَفْسِي اذْهَبُوا إِلَى غَيْرِي
Verily, I had prayed against my people, so now I am only concerned for myself! Go to someone else!
Source: Ṣaḥīḥ al-Bukhārī 4712
Shaykh al-Islam Ibn Taymiyyah commented:
وَدُعَاءُ نُوحٍ عَلَى أَهْلِ الْأَرْضِ بِالْهَلَاكِ كَانَ بَعْدَ أَنْ أَعْلَمَهُ اللَّهُ أَنَّهُ لَا يُؤْمِنُ مِنْ قَوْمِك إلَّا مَنْ قَدْ آمَنَ وَمَعَ هَذَا فَقَدَ ثَبَتَ فِي حَدِيثِ الشَّفَاعَةِ فِي الصَّحِيحِ أَنَّهُ يَقُولُ إنِّي دَعَوْت عَلَى أَهْلِ الْأَرْضِ دَعْوَةً لَمْ أومر بِهَا فَإِنَّهُ وَإِنْ لَمْ يَنْهَ عَنْهَا فَلَمْ يُؤْمَرْ بِهَا فَكَانَ الْأَوْلَى أَنْ لَا يَدْعُوَ إلَّا بِدُعَاءِ مَأْمُورٍ بِهِ وَاجِبٍ أَوْ مُسْتَحَبٍّ فَإِنَّ الدُّعَاءَ مِنْ الْعِبَادَاتِ فَلَا يُعْبَدُ اللَّهُ إلَّا بِمَأْمُورِ بِهِ وَاجِبٍ أَوْ مُسْتَحَبٍّ
The prayer of Noah for destruction against the people of the earth was after Allah informed him that none of his people would believe if they have not already. Despite this, it is proven in the authentic Hadith about the Intercession that he will say, ‘I prayed against the people of the earth, but I was not commanded to do so.’ Hence, if he was not prohibited from saying it, he was also not commanded to say it. The preference is to not pray except with supplications that are commanded or recommended, for supplications are acts of worship and Allah should not be worshipped except with what is commanded or recommended.
Source: Majmū’ al-Fatāwá 8/336
The supplication of Noah was restricted to himself. It is one of the actions of the Prophets that we are not allowed to emulate as ordinary believers.
The Permanent Committee for Scholarly Research of Saudi Arabia issued the following legal verdict:
والدعاء بفناء كل الكفار اعتداء في الدعاء لأن الله قدر وجودهم وبقاءهم لحكمة والله يفعل ما يشاء ويحكم ما يريد
Praying for the extinction of the unbelievers is transgression in supplication because Allah decreed their lasting existence due to His wisdom, for Allah does what He wishes and He judges as He wills.
Source: Fatāwá al-Lajnah al-Dā’imah 24/276
Similarly, the supplication of Moses, upon him be peace, against Pharaoh and his dynasty was only after Allah revealed to him that they had no redeeming virtues whatsoever.
Allah said:
وَقَالَ مُوسَىٰ رَبَّنَا إِنَّكَ آتَيْتَ فِرْعَوْنَ وَمَلَأَهُ زِينَةً وَأَمْوَالًا فِي الْحَيَاةِ الدُّنْيَا رَبَّنَا لِيُضِلُّوا عَن سَبِيلِكَ رَبَّنَا اطْمِسْ عَلَىٰ أَمْوَالِهِمْ وَاشْدُدْ عَلَىٰ قُلُوبِهِمْ فَلَا يُؤْمِنُوا حَتَّىٰ يَرَوُا الْعَذَابَ الْأَلِيمَ
Moses prayed, ‘Our Lord! You have granted Pharaoh and his chiefs the luxuries and riches of this worldly life, which they abused to lead people astray from Your Way! Our Lord, destroy their riches and harden their hearts so that they will not believe until they see the painful punishment!’
Surat Yunus 10:88
Imam Ibn Kathir commented:
وَهَذِهِ الدَّعْوَةُ كَانَتْ مِنْ مُوسَى عَلَيْهِ السَّلَامُ غَضَبًا لِلَّهِ وَلِدِينِهِ عَلَى فرعون وملئه الذين تبين له أنهم لَا خَيْرَ فِيهِمْ وَلَا يَجِيءُ مِنْهُمْ شَيْءٌ كَمَا دَعَا نُوحٌ عَلَيْهِ السَّلَامُ
This was the supplication of Moses, upon him be peace, due to anger for the sake of Allah and His religion against Pharoah and his chiefs. It became clear to him that there was no good in them, nor would good come from them, just like the supplication of Noah.
Source: Tafsīr Ibn Kathīr 10:88
Again, the supplication of Moses was specific to his circumstances and not a prayer that believers are permitted to emulate. It was based upon what Allah revealed to him in the Unseen, which no one else has access to.
We must remember that forgiveness is for our benefit, not necessarily for the benefit of those who have wronged us. Those who forgive others do not carry the burdens of malice and unresolved anger, which can lead to prolonged distress or even chronic physical health issues.
Therefore, the way of the Salaf is to recommend mercy and forgiveness in all circumstances, even as they struggled against the same oppressors to stop them from hurting innocent people. Prayer for the guidance of wrongdoers is the best cure for the heart’s disease of malice (hiqd).
Al-Fudayl ibn ‘Iyad, may Allah have mercy on him, said:
إِذَا أَتَاكَ رَجُلٌ يَشْكُوإِلَيْكَ رَجُلًا فَقُلْ يَا أَخِي اعْفُ عَنْهُ فَإِنَّ الْعَفْوَ أَقْرَبُ لِلتَّقْوَى فَإِنْ قَالَ لَا يَحْتَمِلُ قَلْبِي الْعَفْوَ وَلَكِنْ أَنْتَصِرُ كَمَا أَمَرَنِي اللهُ عَزَّ وَجَلَّ قُلْ فَإِنْ كُنْتَ تُحْسِنُ تَنْتَصِرُ مِثْلًا بِمِثْلِ وَإِلَّا فَارْجِعْ إِلَى بَابِ الْعَفْوِ فَإِنَّ بَابَ الْعَفْوِ أَوْسَعُ فَإِنَّهُ مَنْ عَفَا وَأَصْلِحْ فَأَجْرُهُ عَلَى اللهِ وَصَاحِبُ الْعَفْوِ يَنَامُ اللَّيْلَ عَلَى فِرَاشِهِ وَصَاحِبُ الِانْتِصَارِ يُقَلِّبُ الْأُمُورَ
If a man comes to you complaining about another man, then say, ‘O brother, forgive him as forgiveness is closer to righteousness.’ If he says my heart cannot tolerate forgiveness, but rather retaliation as Allah Almighty has commanded me, then say, ‘If you must, do so in the best manner and retaliate with the same measure which you were afflicted, or else return to the door of forgiveness. Surely, the door of forgiveness is wider. Whoever forgives and sets things right, his reward is with Allah. The one who forgives will sleep comfortably in his bed, but the one who avenges will toss and turn over his affairs.’
Source: Ḥilyat al-Awliyā’ 8/112
As Imam Ibn Muflih cited the poet:
لَمَّا عَفَوْتُ وَلَمْ أَحْقِدْ عَلَى أَحَدٍ أَرَحْتُ نَفْسِي مِنْ هَمِّ الْعَدَاوَاتِ
When I had forgiven and held no malice towards anyone, my soul was relieved from the worries of enmity.
Source: Al-Ādāb al-Sharʻīyah 1/53
In sum, it is permissible for Muslims to pray against oppressors as long as they do not transgress the limits. This is a concession and the lowest acceptable level. It is better to be patient in the face of oppression, forgive those who have wronged us, and ask Allah to guide them to repentance, even if we must struggle against them to forbid their evil. Allah greatly rewards those who forgive others and relieves them from the burdens of unresolved anger.
Success comes from Allah, and Allah knows best.