For three weeks, the world has watched war crimes apparently committed by both sides in Gaza: lethal attacks on schools and hospitals, rockets aimed at civilians, tunnels chillingly lined with syringes and ropes; and the dead and dying children. Now the call goes out from politicians and the UN secretary general for “accountability” and “justice”. That should mean a proper forensic investigation with criminal charges against commanders if the evidence warrants, heard in an international criminal court. It is important to understand why this could happen and why it probably will not – and why British diplomats have connived in making Gaza a legal black hole.

There is, after all, an international criminal court (ICC) in The Hague, with a prosecutor equipped to investigate and charge the crimes that seem to be occurring in the conflict. But her power to act arises only in two relevant circumstances: first by a reference from the UN security council, which is sure to be blocked by at least one of the five permanent members – by the US (always protective of Israel), by Russia (afraid of where a criminal investigation of Malaysia Airlines flight MH17 might lead), by China (obsessed with state sovereignty), and even by Britain and France.

Then there is the alternative basis for empowering the ICC prosecutor: a state that has signed up to the ICC treaty may require the prosecutor to investigate international crimes committed on its territory or by its people. Israel has refused to ratify the treaty, thereby depriving itself of a means to hold Hamas to account for its rocket attacks.

But can the state of Palestine ratify the treaty? In 2009, it attempted to invoke an ICC investigation over Operation Cast Lead, but the prosecutor refused to accept it was a “state”. However, in November 2012, the UN general assembly accorded Palestine the status of statehood – as a non-member observer state, but a state nonetheless. It has since been permitted to become a state party to 13 international treaties. Will it now accede to the ICC treaty and invite the prosecutor to investigate war crimes in Gaza since 2012?

It may. But it has not done so until now because of the pressure brought to bear on the Palestinian president, Mahmoud Abbas – mostly from the US but also from Britain and France, whose diplomats claim any prosecutions of either party for war crimes would undermine peace negotiations. This is nonsense, as all but diplomats must by now realise. Their efforts over past decades have come to naught and the hatred reignited by the present war will scupper peace for the foreseeable future unless some form of justice process is permitted to begin.

There is no alternative. The UN human rights council promises to set up an independent investigation but, after its Goldstone inquiry into the 2008-09 Gaza war Operation Cast Lead castigated both sides, Goldstone himself retracted the central finding – that Israel had a policy of targeting civilians. There were no prosecutions of Hamas commanders, and although Israel investigated allegations against 400 soldiers, just two were brought to trial and the only prison sentence – of seven months – was imposed on a soldier for stealing a credit card.

The advantage of an ICC referral is that it would provide a strong incentive to both sides to punish their own criminals, effectively to forestall their indictment at The Hague. Bringing military leaders and the politicians who approve their conduct within the “command responsibility” net will be a disincentive to committing further crimes. By spelling out particulars of the charges, indictments would clarify that, for example, deliberately storing rockets in or near a school or hospital is a war crime, as is a decision to bomb that school or hospital in the knowledge that civilians are taking shelter there. Of course, trials can only be held when alleged perpetrators are caught but this can happen, even to heads of state.

There is also the need for new precedents in the law of war to limit the behaviour of modern army behemoths. The most wicked use of military might – Operation Searchlight – conducted by depraved Pakistani generals in Dhaka in 1971 has gone unpunished although a few of its perpetrators are still alive. Everyone (and particularly the foreign secretary, Philip Hammond) is talking about “the law of proportionality”, but few understand it.

Obviously it is “disproportionate” if 1,400 (mainly civilians) are killed on one side, as against 50 soldiers on the other. But in law the issue is defined as whether “collateral damage” to civilians by an attack on a military target (for example a school where rockets are stored) is “excessive in relation to the concrete and direct military advantage anticipated”. This allows commanders to think they can get away with shelling the school because the destruction of the rockets gives their side a concrete advantage. A court conviction would bring home to them that no “military advantage” can ever justify the mass murder of children.

That is why David Cameron and Hammond, if they really want “something to be done”, should reverse British policy and encourage the Palestinian Authority to join the ICC with a request to investigate Gaza. There will be objections from Israel and perhaps from Hamas (its war crimes would be investigated too) but these can, I think, be surmounted. The sooner ICC investigators can begin collecting evidence and interviewing witnesses the better.

International law is clear on the question of Israel and Palestine: “Israel is entitled to exist, to be recognised and to security, and the Palestinian people are entitled to their territory, to exercise self-determination and to their own state” (Justice Roslyn Higgins’ pithy and correct summary). But international diplomacy has failed to bring this about and the current crisis makes the poet Auden’s weary point: “I and the public know / What all schoolchildren learn / Those to whom evil is done / Do evil in return.”

At a time when, yet again, both sides appear to be breaching the Geneva conventions and failing to observe the minimum standards of humanity, the ICC offers the only prospect of any accountability. It should be given the opportunity to define and delimit the defence of “military necessity” that is being claimed by both sides. War law must bring home to any political or military leader who considers taking an action that will foreseeably or inevitably involve the deaths of civilians that they must not merely be sure of military advantage: they must be certain of an acquittal when placed in the dock of an international criminal court.