A really good article on how Islamic doctrine advocates a 'just war doctrine'. Its too long to quote it all, but highly recommend a read. For Quranic quotes it uses a different translation to the standard sahih international that I have been quoting, but the meaning is still essentially the same:
https://yaqeeninstitute.org/en/justin-parrott/jihad-as-defense-just-war-theory-i...On the specific matter of chapter 9:
Quote:The most commonly cited “sword verse” commands Muslims to fight, in self-defense, against enemies who habitually broke their peace treaties:
When the [four] forbidden months are over, wherever you encounter the idolaters, kill them, seize them, besiege them, wait for them at every lookout post; but if they turn [to God], maintain the prayer, and pay the prescribed alms, let them go on their way, for God is most forgiving and merciful.[30]
The phrase “kill them, seize them,” is often cited alone without reference to surrounding verses or even the second part of the verse that emphasizes God’s mercy. Yet, conversion to Islam is not the reason this command was given. The following verse offers asylum and safe passage to any enemy who requested it, regardless of whether they accepted Islam or not:
If any one of the idolaters should seek your protection [Prophet], grant it to him so that he may hear the word of God, then take him to a place safe for him, for they are people with no knowledge [of it].[31]
Furthermore, the passage immediately following lays out the context in which the command to fight is justified:
How could there be a treaty with God and His Messenger for such idolaters? But as for those with whom you made a treaty at the Sacred Mosque, so long as they remain true to you, be true to them; God loves those who are mindful of Him. [How,] when, if they were to get the upper hand over you, they would not respect any tie with you, of kinship or of treaty? They please you with their tongues, but their hearts are against you and most of them are lawbreakers. They have sold God’s message for a trifling gain, and barred others from His path. How evil their actions are! Where believers are concerned, they respect no tie of kinship or treaty. They are the ones who are committing aggression. If they turn to God, keep up the prayer, and pay the prescribed alms, then they are your brothers in faith: We make the messages clear for people who are willing to learn. But if they break their oath after having made an agreement with you, if they revile your religion, then fight the leaders of disbelief—oaths mean nothing to them—so that they may stop. How could you not fight a people who have broken their oaths, who tried to drive the Messenger out, who attacked you first? Do you fear them? It is God you should fear if you are true believers.[32]
It is noted that the offending party honored neither their peace treaties, nor the traditional Arab sense of honor. Only by ignoring this greater context can advocates of abrogation uphold their opinion. M.A.S. Abdul Haleem points out the flaws in this interpretation:
The main clause of the sentence, ‘kill the polytheists,’ is singled out by some non-Muslims as representing the Islamic attitude to war. Even some Muslims takes this view and allege that this verse abrogated many other verses including, ‘There is no compulsion in religion,’ (2:256) and even according to one solitary extremist, ‘God is forgiving and merciful.’
This far-fetched interpretation isolates and decontextualizes a small part of a sentence and of a passage which gives many reasons for the order to fight such polytheists: they continually broke their agreements and aided others against the Muslims, they started hostilities against the Muslims, barred others from becoming Muslims, expelled them from the Holy Mosque and even from their own homes. At least eight times the passage mentions the misdeeds of these people against the Muslims.
Moreover, consistent with the restriction of war elsewhere in the Quran, the immediate context of this ‘sword verse’ exempts such polytheists who do not break their agreements and who keep peace with Muslims. It orders that those enemies seeking safe conduct should be protected and delivered to the place of safety they seek. The whole of this context to verse 9:5, with all its restrictions, is ignored by those who simply isolate one part of a sentence to build on it their theory of violence in Islam.[33]
So the Quran never actually says that war should be restricted to self defence, except in the verse you choose not to quote?