Since Islam is not a pacifist
system, fighting is allowed only in self-defense and/or removing oppression.
Those who have been attacked are permitted to take up arms because they have been wronged- God has the power to help
them- those who have been driven unjustly from their homes only for saying, ‘Our Lord is God.’ If God did not repel some people by means of others, many places of gathering, markets, government institutions and places of worship, where
God’s name is much invoked, would have been destroyed. God is sure to help those who help His cause- God is strong and mighty. [22:39-40] (note: often translated as: …many monasteries, churches, synagogues, and mosques, where
God’s name is much invoked, would have been destroyed.)
Retaliation must be controlled and targeted against the enemy combatants only.
And fight in the cause of God against those who fight you, but do not aggress, God does not love the aggressors. Kill them wherever you encounter them, and drive them out from where they drove you out, for
persecution is more serious than killing. Do not fight them at the Sacred Mosque unless they fight you there. If they do fight you, kill them- this is what such disbelievers deserve- If they cease hostility [you must do likewise], then
surely Allah is Forgiving, Merciful.And fight them so there is no more persecution, and so that the system is for God. If they cease, then there will be no aggression except against the wicked. [2:190 - 93]
Muslims are required to accept peace if they are offered peace.
But if they incline towards peace, you [Prophet] must also incline towards it, and put
your trust in God: He is the All Hearing, the All Knowing. [8:61]
So if they withdraw and do not fight you, and offer you peace, then God gives you no way against them. [Part of 4:90]
Prisoners of Wars are to be treated well and cared for and to be released (but not until) after the War [ensuring safety].
you meet the disbelievers in battle, strike them in the neck, and once they are defeated, bind any captives firmly––later you can release them by grace or by ransom––until the toils of war [the battle]
have ended. That [is the way (Law)]. God could have defeated them Himself if He had willed, but His purpose is to test some of you by means of others. He will not let the deeds of those who are killed for His cause come to nothing; [47:4]
And [the pious] who give food - however great be their own want of it - unto the needy, and the orphan, and the captive, [76:8]
Muslims must respond to the aggressors proportionately - forgiveness and patience is preferred [whenever this is a viable option].
If you [believers] have to respond to an attack, make your
response proportionate, but it is best to stand fast(wala-in sabartum lahuwa khayrun lilssabireena). [16:126]
Muslims must not abuse the permission to retaliate and use it as a false pretext in God’s name for the sake of imperialistic, colonialist worldly interests nor act as mercenaries.
So, you who believe,
be careful when you go to fight in God’s way, and do not say to someone who offers you a greeting of peace, ‘You are not a believer,’ out of desire for the chance gains of this life- God has plenty of gains for you. You yourself
were in the same position [once], but God was gracious to you, so be careful: God is fully aware of what you do. [4:94]
Muslim nations must be armed to deter
hostile aggressors from waging war.
Hence, make ready against them whatever force and war mounts you are able to muster, so that you might deter thereby the enemies of God, who are your enemies
as well, and others besides them of whom you may be unaware, [but] of whom God is aware; and whatever you may expend in God's cause shall be repaid to you in full, and you shall not be wronged. [8:60]
Muslims are prohibited from executing [killing] non-combatant apostates or hypocrites and force conversions.
But as for those who seek refuge with people with whom you have a treaty,
or who come over to you because their hearts shrink from fighting against you or against their own people, God could have given them power over you, and they would have fought you. So if they withdraw and do not fight you, and offer you peace, then
God gives you no way against them [4:90]
Failing diplomatic mediation between (believers) fighting factions, the impartial Islamic authorities must reconcile and
bring about peace based on equity - even with use of force - as a last resort.
And if two groups of the Believers are engaged in fighting, then make peace and reform between
those two. Then if one of them went beyond limits against the other, then fight that (group) which crosses the limits until that (group) takes a turn to the ordainment of God. Then if the (erring group) complied, then make
reconciliation between those two with justice, and be equitable. Surely, Allah likes those who behave in equitably. [49:9]
Thus, the normal relationship between
people is of peace and not war (49:13) and war is detested by Muslims (and others) albeit a necessity at times (2:216).
If Muslims fail to adhere to the principles of the Quran when
reacting to the victimization of Muslims, they would simply help their opponents in achieving their goals against themselves.
For Muslims all ‘secondary sources’ [including
‘Islamic sciences or doctrines’] must be subservient to these Quranic principles and not contrariwise. (2:185)
Moreover, Muslims must not support those who are
in the wrong [in their wrong doing] even if they are fellow Muslims.
Help one another to do what is right and good; do not help one another towards sin and hostility.
Be mindful of God, for His punishment is severe. [Part of 5:2]
And Allah knows best.