The Messenger of Allah ﷺ saw a slain woman during one of his military expeditions, so he forbade the killing of women and children.
حدثنا ابن نمير حدثنا عبيد الله عن نافع
أن رسول الله ﷺ رأى في بعض مغازيه امرأة مقتولة فنهى عن قتل النساء والصبيان
Its isnad is sahih, and it was narrated by the group except Nasai, as in Muntaqa 4271. Something similar in meaning has already passed in the hadith of Ibn Abbas, 2316.