Whenever the Messenger of Allah ﷺ appointed a commander over an army or a raiding party, he would personally instruct him to be mindful of Allah and to treat the Muslims with him well. Then he would say, "Fight in the name of Allah and in the path of Allah. Fight those who disbelieve in Allah. Go to battle, but do not act treacherously with the spoils, do not break your pledges, do not mutilate the dead, and do not kill a child…"
كان رسول الله ﷺ إذا أمر أميرا على جيش، أو سرية أوصاه في خاصته بتقوى الله ومن معه من المسلمين خيرا، ثم قال: اغزوا باسم الله في سبيل الله، قاتلوا من كفر بالله، اغزوا، ولا تغلوا، ولا تغدروا، ولا تمثلوا، ولا تقتلوا وليدا…
Muslim narrated it in the Book of Jihad and Expeditions (3:1731) through various routes from Sufyan, from Alqama bin Marthad, from Sulayman bin Burayda, from his father, who mentioned it in a long hadith.Transgression here refers to the prohibitions mentioned in the sunnahs and reports, such as mutilation, misappropriation of spoils, killing women, children, and old men who have no counsel and do not fight, killing monks and hermits, burning trees, and killing animals without benefit. This has been reported from a group of the companions and the successors.