According to the Qur’an, war represents an “unwanted obligation” which has to be carried out with strict observance of particular humane and moral guidelines and which must not be resorted to except when it is absolutely inevitable.
In one Qur’anic verse, it is explained that those who start wars are the disbelievers and that God does not approve of wars:
éEach time they kindle the fire of war, God extinguishes it. They rush about the earth corrupting it. God does not love corrupters. (Qur’an, 5:64)
In the case of a conflict, before engaging in a war, believers must wait until fighting becomes compulsory. Believers are allowed to fight only when the other party attacks and no other alternative except war remains:
But if they cease (fighting), God is Ever-Forgiving, Most Merciful. (Qur’an, 2:192)
A closer examination of the Prophet Muhammad’s life reveals that war was a method resorted for defensive purposes only in unavoidable situations.
The revelation of the Qur’an to the Prophet Muhammad continued for a period of 23 years. During the first 13 years of this period, Muslims lived as a minority under a pagan order in Mecca and faced much oppression. Many Muslims were harassed, abused, tortured, and even murdered, their houses and possessions plundered. Despite this, however, Muslims led their lives without resorting to violence and always called the pagans to peace.
When the oppression of the pagans escalated unbearably, the Muslims emigrated to the town of Yathrib, which was later to be renamed Madinah, where they could establish their own order in a freer and more friendly environment. Even establishing their own system did not prompt them to take up weapons against the aggressive pagans of Mecca. Only after the following revelation, the Prophet commanded his people to prepare for war:
Permission to fight is given to those who are fought against because they have been wronged é truly God has the power to come to their support é those who were expelled from their homes without any right, merely for saying, “Our Lord is God”é (Qur’an, 22:39-40)
In brief, Muslims were allowed to wage war only because they were oppressed and subjected to violence. To put it in another way, God granted permission for war only for defensive purposes. In other verses, Muslims are warned against the use of unnecessary provocation or violence:
Fight in the Way of God against those who fight you, but do not go beyond the limits. God does not love those who go beyond the limits. (Qur’an, 2:190)
After the revelation of these verses, several wars occurred between the Muslims and the pagan Arabs. In none of these wars, however, were the Muslims the inciting party. Furthermore, the Prophet Muhammad established a secure and peaceful social environment for Muslims and pagans alike by signing the peace agreement of Hudaybiya which conceded to the pagans most of their requests. The party who violated the terms of the agreement and started hostilities once again were the pagans. With rapid conversions into Islam, the Islamic armies mustered a great force against the pagan Arabs. However, Muhammad conquered Mecca without bloodshed and in a spirit of tolerance. If he wished, Muhammad could have taken revenge on pagan leaders in the city. Yet, he did not do harm to any one of them, forgave them and treated them with the utmost tolerance. In the words of John Esposito, a Western expert on Islam, “eschewing vengeance and the plunder of conquest, the Prophet instead accepted a settlement, granting amnesty rather than wielding the sword toward his former enemies.” 
Pagans, who would later convert to Islam of their own free will, could not help admiring such nobility of character in the Prophet.
Not only during Mecca’s conquest, but also in the course of all the battles and conquests made in the time of the Prophet Muhammad, the rights of innocent and defenseless people were meticulously protected. The Prophet Muhammad reminded believers numerous times about this subject and by his own practice became a role model for others to follow. Indeed, he addressed believers who were about to go to war in the following terms: “Go to war in adherence to the religion of God. Never touch the elderly, women or children. Always improve their situation and be kind to them. God loves those who are sincere.”  The Messenger of God also clarified the attitude Muslims must adopt even when they are in the middle of a raging battle:
Do not kill children. Avoid touching people who devote themselves to worship in churches! Never murder women and the elderly. Do not set trees on fire or cut them down. Never destroy houses! 
The Islamic principles God proclaims in the Qur’an account for this peaceful and temperate policy of the Prophet Muhammad. In the Qur’an, God commands believers to treat the non-Muslims kindly and justly:
God does not forbid you from being good to those who have not fought you over religion or driven you from your homes, or from being just towards them. God loves those who are just. God merely forbids you from taking as friends those who have fought you over religion and driven you from your homes and who supported your expulsion… (Qur’an, 60:8-9)
The verses above clarify how Muslims should behave towards non-Muslims: A Muslim should treat all non-Muslims kindly and only avoid making friends with those who show enmity towards Islam. In a case where this enmity causes violent attacks against Muslims, that is, where they wage a war against them, then Muslims should respond to them justly by considering the humane dimensions of the situation. All forms of barbarism, unnecessary acts of violence and unjust aggression are forbidden by Islam. In another verse, God warns Muslims against this and explains that rage felt towards enemies should not cause them to fall into injustice:
You who believe! Show integrity for the sake of God, bearing witness with justice. Do not let hatred for a people incite you into not being just. Be just. That is closer to heedfulness. Heed God (alone). God is aware of what you do. (Qur’an, 5:8)
 John L. Esposito, “Islam: The Straight Path“, Oxford University Press, 1998, p. 10
 Ramuz El Hadis, Vol 1, 84/8
 Ramuz El Hadis, Vol 1, 76/12
Harun Yahya is a prominent Turkish intellectual.
Buy the relevant / Harun Yahya’s book (s) now: