Narrated Anas ibn Malik: The Prophet ﷺ said: Go in Allah's name, trusting in Allah, and adhering to the religion of Allah's Messenger. Do not kill a decrepit old man, o a young infant, or a child, or a woman; do not be dishonest about booty, but collect your spoils, do right and act well, for Allah loves those who do well.
Related hadith on this topic
Explanation & Benefits
Shaykh Umar Farooq Saeedi
Benefits and Issues:
It is not permissible to kill an elderly person in battle.
Except for such elderly people about whom it is known that they give plans and strategies.
And such women who are involved in matters like espionage, etc.
It will be permissible to kill them.
Source: Sunan Abu Dawood – Commentary by Shaykh Umar Farooq Saeedi, Page: 2614