The following verses of the Holy Quran clearly state that fighting is only permitted as a defensive recourse against oppression and that fundamental freedom of religion and conscience must be maintained at all times.
1) Conditions on permission to fight– must be defensive and to protect universal freedom of conscience
Permission to fight is given to those against whom war is made, because they have been wronged — and Allah indeed has power to help them. Those who have been driven out from their homes unjustly only because they said, ‘Our Lord is Allah’. And if Allah did not repel some men by means of others, there would surely have been pulled down cloisters and churches and synagogues and mosques, wherein the name of Allah is oft commemorated. And Allah will surely help one who helps Him. Allah is indeed Powerful, Mighty. (22:40-41)
The fundamental verses of the Quran (22:40-41) that permit Muslims to undertake military engagement clearly outline conditions which are defensive and where Muslims were being attacked and persecuted on the basis of their beliefs. Further, the verses clearly state that such undertaking must extend to a universal freedom of conscience where churches, cloisters and synagogues must be protected. This is also further validated by Holy Prophet Muhammad’s (on whom be peace) covenants with the Christians instructing Muslims to never attack Christians on the basis of religion and beliefs.
And fight them until there is no persecution and religion is wholly for Allah. But if they desist, then surely Allah is Watchful of what they do. (8:40)
Verse 8:40 above further endorses the principle that taking up an armed conflict must only be in context of protecting freedom of religion, and if the enemy desists then one should cease hostilities.
Some allegation narratives consider that ‘religion being wholly for Allah’ in this verse means that only Islam is to be enforced as a religion. However this allegation is negated by 22:40-41 above which clarifies that the principle of the Quran is freedom of religion and fighting is not permitted to enforce any one religion.
2) Peace and reconciliation with the enemy must be sought at all times
The Quran states that during wartime, seeking peace and reconciliation is a duty. This is emphasized to such a great degree that even if one fears that the enemy is seeking peace out of deception (as a strategy of war) one should still incline to it and put their trust in Allah (see 8:62-63 below).
And if they incline towards peace, incline thou also towards it, and put thy trust in Allah. Surely, it is He Who is All-Hearing, All-Knowing. And if they intend to deceive thee, then surely Allah is sufficient for thee. He it is Who has strengthened thee with His help and with the believers. (8:62-63)
And if two parties of believers fight against each other, make peace between them; then if after that one of them transgresses against the other, fight the party that transgresses until it returns to the command of Allah. Then if it returns, make peace between them with equity, and act justly. Verily, Allah loves the just. (49:10)
And fight them until there is no persecution, and religion is freely professed for Allah. But if they desist, then remember that no hostility is allowed except against the aggressors. (2:194)
3) Peace as a fundamental desired state of affairs in Quran
The term ‘Islam’ itself is derived from the root ‘Salema’ which means peace. The traditional greeting used by Muslims translated to ‘peace be with you’. Peace is a prominent theme in the Holy Quran and a fundamental desired state of affairs. Following are a few verses from the Holy Quran that illustrate the fundamental value of peace.
Peace on you-- a word of greeting from the Merciful Lord. (36:59)
And make not Allah a target for your oaths that you may thereby abstain from doing good and acting righteously and making peace between men. And Allah is All-Hearing, All-Knowing. (2:225)
Thereby does Allah guide those who seek His pleasure on the paths of peace, and leads them out of every kind of darkness into light by His will, and guides them to the right path. (5:17)
And Allah calls to the abode of peace, and guides whom He pleases to the straight path. (10:26)
And the servants of the Gracious God are those who walk on the earth in a dignified manner, and when the ignorant address them, they say, ‘Peace!’ (25:64)
He is Allah, and there is no God beside Him, the Sovereign, the Holy One, the Source of Peace, the Bestower of Security, the Protector, the Mighty, the Subduer, the Exalted. Holy is Allah far above that which they associate with Him. (59:24)
4) There can be no compulsion in religion
The Holy Quran declares in 2:257 that there can be no compulsion in religion. The meaning of any given verse of the Holy Quran must comply with this rule. Therefore, any given verse of The Holy Quran addressing armed engagement cannot be taken to mean waging war on disbelievers or infidels on account of their beliefs. This negates the assertion that Quran sanctions violence against disbelievers.