Taken from Introduction to The Book of Jihad and Expedition, by Abdul Hamid Siddiqui. Read the entire text.
Even in a declared war, certain rules must be followed:
The Holy Prophet (may peace be upon him) has given clear instructions about the behaviour of the Muslim army. He observed:
“Set out for Jihad in the name of Allah and for the sake of Allah. Do not lay hands on the old verging on death, on women, children and babes. Do not steal anything from the booty and collect together all that falls to your lot in the battlefield and do good, for Allah loves the virtuous and the pious.”