While aid workers serving conflict-affected civilian populations depend on a set of laws to protect them, some warring parties violate these global agreements, from targeting hospitals and schools to blocking aid workers from reaching civilians with lifesaving goods and services.
But, what exactly are the rules of war and what happens when they are broken?
To find out more about international humanitarian law, known by its acronym IHL, UN News spoke with Eric Mongelard at the UN human rights office, OHCHR.
Here's what you need to know:
Rules of war
International humanitarian law is as old as war. From passages in the Bible and Quran to medieval European codes of chivalry, this ever-growing set of rules of engagement aims to limit a conflict's effects on civilians or non-combatants.
The laws represent "the very minimum rules to preserve humanity in some of the worst situations known to mankind," Mr. Mongelard said, noting that the rules of war apply the moment an armed conflict has begun.
The laws in place today are primarily based on the Geneva Conventions, the first of which predates the UN by almost 200 years.
What are the Geneva Conventions?
Following Switzerland's declaration of "perpetual" international neutrality in 1815, a neighbouring Austrian-French war in 1859 prompted Henri Dunant, a Swiss national tending to battlefield casualties, to propose what became the International Committee for Aid to the Wounded.
That group shortly thereafter transformed into the International Committee of the Red Cross (ICRC) followed by the First Geneva Convention, signed in 1864 by 16 European nations. Since then, a growing number of nations have adopted subsequent other Geneva Conventions.
More than 180 states have become parties to the 1949 conventions. They include 150 states party to Protocol I, which extended protection under the Geneva and Hague conventions to persons involved in wars of "self-determination" which were henceforth redefined as international conflicts and also enabled the establishment of fact-finding commissions in cases of alleged breaches of the convention.
More than 145 states are party to Protocol II, which extended human rights protections to persons involved in severe civil armed conflict that had not been covered by the 1949 accords.
New rules of war and protocols to the Geneva Conventions have developed as battlefield weaponry and warfare have become more sophisticated and sinister.
International treaties have also emerged to ban a range of weapons triggered by 20th century conflicts, from the use of mustard gas in First World War trenches to airdropping napalm across Viet Nam. These binding conventions also oblige signatories to respect international humanitarian law.
Who is protected?
Hospitals, schools, civilians, aid workers, and safe routes to deliver emergency assistance are among people and places protected by international humanitarian law.
A protocol to the Geneva Conventions adopted in 1977 contains the "most rules" on civilian protection, Mr. Mongelard said. In general, key principles are divided into two sets of rules, with the first centred on respect for the dignity and life of a person and humane treatment. That includes prohibitions on summary executions and torture.
The second applies to distinction, proportionality, and precaution, he said, binding every warring party.
They cannot target civilians, must ensure operations and the weapons they choose to use would minimize or avoid civilian casualties, and must provide sufficient warning to civilian populations of an impending attack.
"Evaluating the effectiveness of a body of law is always a difficult exercise," he said. "Anecdotal evidence shows that IHL is more often respected than not."
Even with these laws in place, 116 aid workers died while doing their jobs in some of the world's most dangerous places in 2022.
Since the start of the year, 62 aid workers have already been killed, 84 wounded, and 34 kidnapped, according to the UN, which cited provisional data in August from the independent research organization Humanitarian Outcomes. Since 7 October, a total of 15 UN workers have been killed in Gaza.
However, without international humanitarian law and related rules, the situation in battlefields across the world "would be far worse", Mr. Mongelard said.
"Parties to the conflict, when they're faced with allegations of, for example, strikes against civilians or civilian infrastructure, will always either seek to deny or seek to explain, thereby really reinforcing that they do recognize that these rules are important," he said.
Ending impunity
"Serious violations of international humanitarian law are war crimes", he continued. As such, all States have an obligation to criminalize those behaviours, investigate, and prosecute perpetrators.
International humanitarian law can also be violated outside of an actual war. Meanwhile, crimes against humanity have never been agreed on in a dedicated treaty of international law. At the same time, the Rome Statute provides the latest consensus of the international community on what falls within the scope. It is also the treaty that offers the most extensive list of specific acts that may constitute the crime.
When violations occur, mechanisms have been set up, from UN tribunals for Cambodia, Rwanda, and the former Yugoslavia to such national efforts as was seen in 2020 in the DR Congo when a military court brought a war criminal to justice.
The Hague-based International Criminal Court (ICC), established in 2002 by the Rome Statute, has also had jurisdiction over allegations of violations of international humanitarian law.
Global courtroom
The first permanent global criminal court established to help end impunity for perpetrators of the most serious crimes of concern to the global international community, the ICC is an independent international organization, and is not part of the UN system.
But, the UN has a direct link. The ICC Prosecutor can open cases or investigations referred by the UN Security Council referral, by States parties to the Rome Statute, or based on information from reliable sources.
While not all 193 UN Member States recognize the ICC, the court can launch investigations and open cases related to allegations from anywhere in the world. Cases have been heard and decisions rendered on a range of violations, from using rape as a weapon of war to conscripting children as combatants.
The court is currently investigating 17 cases. Part of its work includes issuing arrest warrants for suspected perpetrators. This includes an outstanding warrant against Russian President Vladimir Putin related to his country's full-scale invasion of Ukraine.
Everyone can contribute
While international humanitarian law governs warring parties to a conflict, the general public has an important role to play, Mr. Mongelard said.
He warned that dehumanizing a group of people can send a message to armed forces in the vicinity that "some violations would be okay".
"One thing that is important is avoiding the dehumanization of the other or the dehumanization of the enemy, avoiding hate speech, and avoiding incitement to violence," he said. "That's where the general public can contribute."
As for international organizations, shortly after the Israel-Gaza conflict erupted on 7 October, the ICC opened an ongoing investigation, operating a link to provide submissions of allegations of war crimes, crimes against humanity, genocide, and aggression - which violate international humanitarian law.
A reminder of the warring parties' obligations regarding the Israel-Gaza crisis was issued by the UN emergency relief coordinator Martin Griffiths who told the UN Security Council: "There are simple rules of war," adding "parties to armed conflict must protect civilians."
In the same vein, the World Health Organization (WHO) Regional Director for the Eastern Mediterranean Ahmed Al Mandhari talked with UN News following the strike on a Gazan hospital.
"Health care is not a target, and it should not be a target," "WHO is calling all conflicting parties to adhere to international humanitarian law" and "protect civilians" alongside "those health care professionals who are in the field and the ambulances".