A war crime is a violation of the laws of war. The legal understanding of war crimes has been codified in several multilateral treaties, most notably the Geneva Conventions. More recently, the most comprehensive legal statement on war crimes was the Rome Statute of the International Criminal Court.
To be liable for a war crime, the victim must be protected under the Geneva Conventions. GC I, II, and III apply to soldiers, while GC IV applies to civilians and "unlawful combatants."