Surah At-Tawba

9:5

فَإِذَا ٱنسَلَخَ ٱلْأَشْهُرُ ٱلْحُرُمُ فَٱقْتُلُوا۟ ٱلْمُشْرِكِينَ حَيْثُ وَجَدتُّمُوهُمْ وَخُذُوهُمْ وَٱحْصُرُوهُمْ وَٱقْعُدُوا۟ لَهُمْ كُلَّ مَرْصَدٍۢ ۚ فَإِن تَابُوا۟ وَأَقَامُوا۟ ٱلصَّلَوٰةَ وَءَاتَوُا۟ ٱلزَّكَوٰةَ فَخَلُّوا۟ سَبِيلَهُمْ ۚ إِنَّ ٱللَّهَ غَفُورٌۭ رَّحِيمٌۭ

And when the sacred months have passed, then kill the polytheists wherever you find them and capture them and besiege them and sit in wait for them at every place of ambush. But if they should repent, establish prayer, and give zakah, let them [go] on their way. Indeed, Allah is Forgiving and Merciful.

Tafsir 9:5

With the ending of the sacred months (Dhū Al-Qa‘dah, Dhū Al-Ḥijjah, Muḥarram and Rajab), during which you assured your enemies of safety, kill the idolaters wherever you meet them. Besiege them in their fortresses and lie in wait for them on their paths. If they repent to Allah from their idolatry, establish the prayer and give the Zakat from their wealth, they become your brothers in Islam and you must not fight them any longer. Allah is Forgiving and Compassionate towards those of His servants who repent to Him.