Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
quran:45:14

Say, ˹O Muhammad˺, to those who have believed that they ˹should˺ forgive those who expect not the days of Allah so that He may recompense a people for what they used to earn.  

Tell those who believe to forgive those who do not anticipate, ˹those who do not˺ fear, the days of God, the events which He precipitates, that is to say, forgive the disbelievers the harm which they have caused you — this was before the command to struggle against them ˹had been revealed˺ — that He, God, may requite (a variant reading ˹for li-yajziya˺ has li-najziya, ‘that We may requite’) a people for what they used to earn, when they used to forgive disbelievers the harm which they did.
القرآن:٤٥:١٤

قُلْ لِلَّذِينَ آمَنُوا يَغْفِرُوا لِلَّذِينَ لَا يَرْجُونَ أَيَّامَ اللَّهِ لِيَجْزِيَ قَوْمًا بِمَا كَانُوا يَكْسِبُونَ  

{قل للذين آمنوا يغفروا للذين لا يرجون} يخافون {أيام الله} وقائعه، أي اغفر للكفار ما وقع منهم من الأذى لكم وهذا قبل الأمر بجهادهم {ليجزي} أي الله وفي قراءة بالنون {قوماً بما كانوا يكسبون} من الغفر للكفار أذاهم.