No, forgiveness is not obligatory in the strict legal sense: the Qur'an permits proportionate retaliation and defence, and the scholars classify forgiveness as strongly recommended, a mark of excellence (ihsan) above justice ('adl).
- Allah says that the reward of an evil is an equal evil, but whoever pardons and makes peace, his reward is with Allah (42:40).
- The jurists hold that a victim may take his right, as in retaliation (qisas), take compensation or forgive, and the choice rests with the one wronged, though the Prophet (saw) is reported to have urged forgiveness whenever a case of retaliation was brought to him.
- Some duties around forgiveness are firm: a person may not wrong others beyond what was done to him, must not hold a grudge that leads to cutting ties without right, and must ask forgiveness from those he has wronged.
- Forgiveness does not require a person to remain in contact with someone who continues to harm him, or to remove accountability where the rights of others or public order are involved.
Introduction
Forgiveness is praised throughout the Qur'an and Sunnah, so the question whether it is obligatory is natural. The answer depends on what is meant by obligation (wujub). In Islamic law a duty is something for which a person is rewarded for doing and sinful for omitting. By that measure, the scholars do not class pardon of a personal wrong as a duty. They class it as recommended (mandub) and highly praised. Understanding the reasons helps, because the Qur'an itself shows the lawful options and then points to the higher one.
Two other matters are often confused with it. One is the duty to treat people justly even when angry, which is obligatory. The other is the duty to seek forgiveness from Allah, which is a separate topic. This answer is concerned with the first matter: whether a Muslim must forgive someone who has wronged him.
What the Qur'an says
The central verse is: "The recompense for an evil is an evil like it, but whoever pardons and makes reconciliation, his reward is upon Allah. Indeed, He does not like the wrongdoers" (42:40). The verse first allows an equal response, then says that pardon brings a reward from Allah, and the next verses add: "And whoever defends himself after having been wronged, there is no blame upon them" (42:41), and "But whoever is patient and forgives, that is among the matters requiring resolve" (42:43). The wording of 42:43 calls forgiveness an act of resolve ('azm), which shows that it is a high matter, not a minimum.
Other verses point the same way. Describing the people of piety, Allah says that they are those "who restrain anger and pardon people, and Allah loves the doers of good" (3:134). He says: "Repel evil with that which is better, and the one between whom and you is enmity will become as though he were a close friend" (41:34). The Prophet (saw) is told: "Hold to forgiveness, command what is right and turn away from the ignorant" (7:199). All of these are expressed as encouragement and praise. The Qur'an also protects the right to just redress: "Whoever attacks you, attack him in the same way that he attacked you" (2:194), and "If you punish, punish with the like of that with which you were harmed; but if you are patient, it is better for the patient" (16:126). The commentators, such as al-Tabari and Ibn Kathir, read 16:126 as permission to retaliate, followed by encouragement to forbear.
What the Sunnah adds
The Prophet (saw) said: "Charity does not decrease wealth, and Allah increases a servant who forgives in honour, and no one humbles himself for Allah except that Allah raises him" (Sahih Muslim, Book of Righteousness). At the conquest of Makkah, he said to the Quraysh who had fought him for twenty years: "Go, for you are free", according to the biographers, a report found with some variation in the books of Sira and in al-Bayhaqi, though the chain is disputed by some critics. A better documented example is that of Abu Bakr (ra) and Mistah ibn Uthatha, who took part in the slander against 'A'isha (ra). Abu Bakr swore to stop supporting him, and Allah revealed: "Let them pardon and overlook. Do you not love that Allah should forgive you?" (24:22), and Abu Bakr (ra) replied that he did love it and resumed his support (Sahih al-Bukhari, Book of Tafsir, and Sahih Muslim).
Anas (ra) said that no case of retaliation was brought to the Prophet (saw) without him commanding forgiveness (Sunan Abi Dawud and Sunan al-Nasa'i, graded sahih by al-Albani). This confirms both points: retaliation was lawful and was brought to him as a case, and he encouraged forgiveness without ordering it.
Why the jurists do not call it obligatory
The classical jurists derive rulings from the language of the texts and from practice. The verses on retaliation, in Surah al-Baqara (2:178-179), assume that the family of a victim has the right to seek qisas, to take blood money (diya) or to forgive, and the verse describes forgiveness as a concession and mercy from Allah. If forgiveness were obligatory, the right to retaliation would be empty. Al-Qurtubi, in his commentary on these verses, and Ibn Qudama in al-Mughni record that the heirs have the choice. Al-Nawawi, in his commentary on Sahih Muslim, comments on the hadith on forgiveness in honour and describes pardon as a high virtue the Muslim is urged towards.
A second point is that most injuries are not a purely private matter. Where there are rights of the public, such as theft, assault or fraud, forgiveness by the victim does not remove the ruler's duty to judge. The Prophet (saw) is reported to have said, in the case of a man who stole the cloak of Safwan ibn Umayya, that the hand should still be cut even though Safwan wished to give it to him, because the matter had reached the ruler (Sunan Abi Dawud, Sunan al-Nasa'i, graded sahih by al-Albani). Forgiveness has its place before a case reaches the court, and it is more complex afterwards.
A third point concerns people other than the victim. A person cannot forgive on behalf of someone else, such as a child, or a victim who has died, and cannot waive the claim of another. If a person is asked to forgive what a third party has suffered, the answer is that he lacks the right to do so.
What is obligatory around forgiveness
Several related duties are firm. A person must not exceed the limit in response to wrong, since Allah says: "Do not transgress; Allah does not like transgressors" (2:190). He must not go on bearing malice to the point of boycotting a fellow Muslim for more than three days: the Prophet (saw) said that it is not lawful for a Muslim to desert his brother for more than three nights, and that the better of the two is the one who greets first (Sahih al-Bukhari and Sahih Muslim, Book of Manners). He must also seek forgiveness from those he has harmed: the Prophet (saw) said that whoever has wronged his brother in honour or in anything should seek his pardon today, before there is no dinar or dirham, and before good deeds are taken from the wrongdoer to repay the victim (Sahih al-Bukhari, Book of Wrongs).
Forgiveness is also not the same as returning to an unsafe relationship. The Prophet (saw) said that a believer is not bitten twice from the same hole (Sahih al-Bukhari and Sahih Muslim). Scholars such as Ibn Taymiyya in Majmu' al-Fatawa say that a person may forgive in his heart while taking sensible steps to be safe, and that in the case of ongoing abuse, protecting the vulnerable is itself a duty. A person who struggles to forgive should not feel that he has abandoned the religion. The Prophet (saw) is reported to have said that the strong person is not the one who defeats others in wrestling but the one who controls himself in anger (Sahih al-Bukhari and Sahih Muslim).
Conclusion
Forgiveness of a personal wrong is not an obligation in Islamic law, but it is among the most praised acts, with a promise of reward from Allah. A person who seeks his right is within the law, and a person who forgives has chosen the higher way. What is obligatory is justice, restraint and seeking pardon from those one has wronged. Allah knows best.
References
The Qur'an: 2:178-179, 2:190, 2:194, 3:134, 7:199, 16:126, 24:22, 41:34, 42:40-43.
Sahih al-Bukhari: Book of Manners; Book of Wrongs; Book of Tafsir. Sahih Muslim: Book of Righteousness; Book of Repentance (the story of the slander). Sunan Abi Dawud: Book of Blood Money; Book of Hudud. Sunan al-Nasa'i: Book of Qasama.
al-Qurtubi, al-Jami' li-Ahkam al-Qur'an. Ibn Kathir, Tafsir. Ibn Qudama, al-Mughni. al-Nawawi, Sharh Sahih Muslim. Ibn Taymiyya, Majmu' al-Fatawa.