The Messenger of Allah ﷺ passed by a slain woman on the day of the conquest of Mecca and said, "She was not one who fought." He then forbade the killing of women and children.
حدثنا حسين حدثنا شريك عن محمد بن زيد عن نافع
مر رسول الله ﷺ بامرأة يوم فتح مكة مقتولة فقال ما كانت هذه تقاتل ثم نهى عن قتل النساء والصبيان
Its isnad is sahih. Muhammad bin Zayd, the view I consider most correct is that he is Muhammad bin Zayd bin Muhajir bin Qunfudh, and he is trustworthy. Ahmad, Ibn Main, and Abu Zura affirmed his reliability, and Bukhari mentioned him in Al-Kabir 1/1/84.The meaning of this hadith has already occurred in brief, in the prohibition against killing women and children, on several occasions, the last being 5753. However, this narration specifies that the prohibition occurred during the Battle of Fath, and his statement, "This one was not fighting," was pointed to by Hafiz in Fath al-Bari 6:103, who attributed it to Tabarani in Al-Awsat, from the hadith of Ibn Umar. Haythami did not mention it in Majma al-Zawaid. See also what has already occurred in Musnad Ibn Abbas 2316, and Majma al-Zawaid 5:316.