(19) باب مَا جَاءَ فِي النَّهْىِ عَنْ قَتْلِ النِّسَاءِ، وَالصِّبْيَانِ،
Narrated Ibn 'Umar:
That a woman was found killed in one of the expeditions of the Messenger of Allah (ﷺ), so the Messenger of Allah (ﷺ) rebuked that, and he prohibited killing women and children. There are narrations on this topic from Buraidah and Rabah - and they say he was Riyah - bin Ar-Rabi', Al-Aswad bin Sari', Ibn 'Abbas, and As-Sa'b bin Jaththamah.[Abu 'Eisa said:] This Hadith is Hasan Sahih. This is acted upon according to some of the people of knowledge among the Companions of the Prophet (ﷺ) and others. They disliked killing women and children. This is the view of Sufyan Ath-Thawri and Ash-Shafi'i.Some of the people of knowledge made an exception for killing the women who had children with them during night attacks, this is the view of Ahmad and Ishaq, they permitted it in night attacks.
Reference: Jami` at-Tirmidhi 1569
In-book reference: Book 21, Hadith 30
English translation: Vol. 3, Book 19, Hadith 1569