The Spoils of War - 8:40
If they turn back, know that Allah is your master. He is the best Mawla (Sovereign/Friend/Protector) and the best Helper.
Allah permits war for the purpose of defense:
The Woman Who Is Examined/60:8
Allah does not forbid you to do good to those who do not fight you for the sake of religion and do not drive you out of your homes, and to do justice to them. Allah loves those who do justice.
The Woman Who Is Examined/60:9
But Allah forbids you to be friends only with those who fight you in the cause of religion and drive you out of your homes and help you to be driven out. Those who take them as friends are wrongdoers.
The Women/4:89
They wanted you to disbelieve as they disbelieved so that you might become one with them. Do not take any of them as friends until they take action in the way of Allah. If they turn against you, seize them and kill them wherever you find them. Take them neither as friends nor as helpers;
The Women/4:90
Except those who join a community with whom there is a treaty between you, or who come to you distressed in their breasts because of fighting you or their own people... If Allah had willed, He would have made them to fight against you and they would have fought against you. But if they leave you alone and do not fight you and offer you peace, Allah will not allow you to attack them.
The Repentance/9:12
If they break their covenant after they have made a covenant and attack your religion, fight the leaders of disbelief, for their covenant is null and void. Perhaps they will desist.
The Repentance/9:36
The number of months in Allah´s Book on the day He created the heavens and the earth is twelve according to Allah. Four of them are sacred. This is the perfect religion; do not wrong yourselves in those months (by fighting). But if the idolaters fight you in a total war, then fight them in a total war. Know that Allah is with the righteous.
The Repentance/9:123
O you who believe, fight the disbelievers who surround you and attack you. Let them find firmness in you. Know that Allah is with the righteous.
The Spoils of War/8:39
Fight them until they abolish oppression and oppression and make the religion the religion of Allah alone. If they cease hostility, surely Allah is All-Seeing of what you do.
The Apartments/49:9
And if two groups of the believers fight against each other, reconcile them. If one of them attacks the other, fight the aggressor until he returns to the command of Allah. If they return, then settle their differences impartially and do justice. Allah loves those who do justice.
The Pilgrimage/22:39
Permission has been granted to those who were wronged and war was waged against them. Allah is surely able to support them.
The Pilgrimage/22:40
"Those who were unjustly expelled from their land only because they said: "Our Lord is Allah". If Allah had not defended some of the people against others, the monasteries, churches, synagogues and masjids in which Allah´s Name is much mentioned would have been destroyed. Allah will surely help those who help Him. Allah is Mighty, Powerful,"
The Cow/2:246
"Did not this incident attract your attention? The elders of the Children of Israel said to one of their prophets after Moses, "Appoint us a king so that we may fight for the cause of Allah. He said, "What if war is necessary and you do not fight?"They replied, "Why should we not fight in the cause of Allah when we are driven away from our homes and our children?"But when war was obligatory upon them, they turned away except a few. Allah Knows the wrongdoers."
Council/42:42
But those who oppress the people and those who attack unjustly in the land should be opposed. For them is a painful torment.
The Women/4:75
"What has happened to you that you do not fight in the way of Allah, despite the oppressed men, women and children who cry out, "Our Lord, deliver us from this land whose people are oppressors, protect us, help us"?"
The Cow/2:190
Fight those who fight you in the way of Allah. Do not be aggressive. Allah does not love the aggressors.
The Repentance/9:29
Fight those who believe not in Allah and the Last Day, nor forbid what Allah and His Apostle forbid, nor follow the true religion, from among those to whom the Book has been given, until they submit and pay a tax with their hands.