4:90
إِلَّا ٱلَّذِينَ يَصِلُ ونَ إِلَىٰ قَوْمٍۭ بَيْنَ كُمْ وَ بَيْنَ هُم مِّيثَٰقٌ أَوْ جَآءُ و كُمْ حَصِرَتْ صُدُورُ هُمْ أَن يُقَٰتِلُ و كُمْ أَوْ يُقَٰتِلُ وا۟ قَوْمَ هُمْ وَ لَوْ شَآءَ ٱللَّهُ لَ سَلَّطَ هُمْ عَلَيْ كُمْ فَ لَ قَٰتَلُ و كُمْ فَ إِنِ ٱعْتَزَلُ و كُمْ فَ لَمْ يُقَٰتِلُ و كُمْ وَ أَلْقَ وْا۟ إِلَيْ كُمُ ٱل سَّلَمَ فَ مَا جَعَلَ ٱللَّهُ لَ كُمْ عَلَيْ هِمْ سَبِيلًا
Except for those who take refuge with a people between yourselves and whom is a treaty or those who come to you, their hearts strained at [the prospect of] fighting you or fighting their own people. And if Allah had willed, He could have given them power over you, and they would have fought you. So if they remove themselves from you and do not fight you and offer you peace, then Allah has not made for you a cause [for fighting] against them.
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.