Quran (8:12) [Remember] when your Lord inspired to the angels, "I am with you, so strengthen those who have believed. I will cast terror into the hearts of those who disbelieved, so strike [them] upon the necks and strike from them every fingertip."
"This verse and the verses before and after were revealed about the Battle of Badr, which occurred in Arabia in the early seventh century. A battle in which the pagans of Makkah traveled more than 200 miles to Madinah with an army of about 1000 to destroy Muslims. Prophet Muhammad (peace be on him) and fellow Muslims had suffered severe persecutions and torture for 13 years in the city of Makkah. And now that they had fled Makkah and found a sanctuary in the city of Madinah, they were once again threatened. Muslim Army was only about 300 strong. God Almighty gave the order to Muslims to fight to defend their lives and faith. The enemy came to them with the intent to kill Muslims. It was a war to defend themselves and their Faith. It was a war imposed upon Muslims.
And when you fight, you strive to kill the enemy during the fight.
However, even during the war, Islam has the highest moral law of war. You don't kill children, women or any one who is not fighting with you."
http://www.islam101.com/terror/verse8_12.htm