Surah An-Nisa, ayah 90

4:90

إِلَّا ٱلَّذِينَ يَصِلُونَ إِلَىٰ قَوۡمِۭ بَيۡنَكُمۡ وَبَيۡنَهُم مِّيثَٰقٌ أَوۡ جَآءُوكُمۡ حَصِرَتۡ صُدُورُهُمۡ أَن يُقَٰتِلُوكُمۡ أَوۡ يُقَٰتِلُواْ قَوۡمَهُمۡۚ وَلَوۡ شَآءَ ٱللَّهُ لَسَلَّطَهُمۡ عَلَيۡكُمۡ فَلَقَٰتَلُوكُمۡۚ فَإِنِ ٱعۡتَزَلُوكُمۡ فَلَمۡ يُقَٰتِلُوكُمۡ وَأَلۡقَوۡاْ إِلَيۡكُمُ ٱلسَّلَمَ فَمَا جَعَلَ ٱللَّهُ لَكُمۡ عَلَيۡهِمۡ سَبِيلٗا ٩٠

Illal-ladhīna yasilūna ilā qawmi baynakum wabaynahum mīthāqun aw jā'ūkum hasirat sudūruhum an yuqātilūkum aw yuqātilū qawmahum walaw shā'allāhu lasallatahum 'alaykum falaqātalūkum fa ini'tazalūkum falam yuqātilūkum wa alqaw ilaykumus-salama famā ja'alallāhu lakum 'alayhim sabīlā

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 Allāh 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 Allāh has not made for you a cause [for fighting] against them.