Pre-Islamic Arabs had no rules of war—women, children, elderly, livestock, the dead, clergy, homes, and greenery were all fair game. Prophet Muhammad(sa) set rules of engagement for his people and demanded strict compliance whether enemy observed any rules or not.
Historian Ibn Ishaq reports that after the Battle of Uhud, which the Muslims lost, “… the apostle went out seeking Hamza (his uncle) and found him at the bottom of the valley with his belly ripped up and his liver missing and his nose and ears cut off.”  Abu Sufyan, then a non-Muslim, said to Umar bin Khattab, a Muslim, “There are some mutilated bodies among your dead. By God, it gives me no satisfaction and no anger. I neither prohibited nor ordered mutilation.” 
The companions replied with anger and anguish upon hearing Abu Sufyan’s statement that he did not forbid the Meccans from mutilating martyred Muslims. They were pained also upon seeing Prophet Muhammad’s grief over the inhuman treatment of his uncle’s body. But Prophet Muhammad’s response to the mutilations stands to this day as a model of unmatched leadership and compassion. Ibn Ishaq reports:
When the Muslims saw the apostle’s grief and anger against those who had thus treated his uncle, they said, ‘By God, if God gives us victory over them in the future, we will mutilate them as no Arab has ever mutilated anyone.’ [Muhammad] replied, ‘If you endure patiently that is better. Endure thou patiently. Thy endurance is only in God. Grieve not for them, and be not in distress as to what they plot.’ So the apostle pardoned them and was patient and forbade mutilation. Humayd al-Tawil told me, ‘The Apostle never stopped in a place and left it without enjoining on us almsgiving and forbidding mutilation.’ 
Prophet Muhammad(sa) further declared, “Go forth in the name of Allah and in the cause of Allah. Fight whoever disbelieves (and rejects terms of peace). Go forth and do not steal, do not commit treachery, do not mutilate, and do not kill children” . Al-Tirmidhi said, “The people of knowledge hate mutilation” .
Thus, through Prophet Muhammad’s example, all these barbaric wartime practices were abolished. Prophet Muhammad’s example is derived from the Qur’an itself, which compels Muslims to treat captives with dignity and compassion . Abu Bakr(ra), the first successor to Prophet Muhammad(sa), clearly related Prophet Muhammad’s wisdom to the Muslim armies shortly after Prophet Muhammad’s demise:
O people! I charge you with ten rules; learn them well! Stop, O people, that I may give you ten rules for your guidance in the battlefield. Do not commit treachery or deviate from the right path. You must not mutilate dead bodies. Neither kill a child, nor a woman, nor an aged man. Bring no harm to the trees, nor burn them with fire, especially those which are fruitful. Slay not any of the enemy’s flock, save for your food. You are likely to pass by people who have devoted their lives to monastic services; leave them alone. 
In another instance, Abu Bakr(ra) related an abbreviated form of the instructions of the Prophet Muhammad(sa), “Do not kill women or children or an aged, infirm person. Do not cut down fruit-bearing trees. Do not destroy an inhabited place” . These rules were necessary to enforce because the pre-Islamic rules of warfare did not forbid such acts. Likewise, while the pre-Islamic custom was to kill or enslave POWs, Prophet Muhammad(sa) ordered them to be freed upon ransom—a progressive strategy that nations even today have not uniformly accepted.
For critics to assert that Prophet Muhammad(sa) violated some alleged “chivalrous war code” is totally false. On the contrary, Prophet Muhammad(sa) advanced the rules of compassion and care for the enemy to a level that even today’s most advanced societies have not reached. In sum, Prophet Muhammad(sa) did not violate some non-existent Arab chivalrous war code—he created a war code that is unmatched in humanitarianism by even today’s standards. Among other things, Prophet Muhammad’s war code categorically forbids any attack on a civilian for any reason.
 Alfred Guillaume, The Life of Muhammad – A Translation of Ishaq’s Sirat Rasul Allah 387 (Oxford University Press, 1955).
 Id. at 386.
 Id. at 387-88.
 Sunan Al-Tirmidhi, Book of Compensation for Murder (emphasis added).
 Qur’an 76:8-10.
 Al-Muwatta; Book 21, Number 21.3.10 and Aboul-Enein, H. Yousuf and Zuhur, Sherifa, Islamic Rulings on Warfare, 22, Strategic Studies Institute, US Army War College, Diane Publishing Co., Darby, PA.
 Al-Muwatta, Book 21.3.9-10.