While the government and IDF strenuously strove to implement lessons learned from the last war and provide the troops in Gaza with every possible means to shield themselves against enemy fire, they negligently allowed our soldiers' flanks to be exposed to danger from a different quarter. The international campaign accusing officers of war crimes against Palestinian civilians has steadily been gathering steam over the past decade. The short-sighted reluctance of elected officials and the IDF's legal department to confront the issue head-on has left the government and its senior officers scurrying to develop an effective strategy and play catch up. Indeed, no sooner had the first F-16 been fueled up and the netting pulled off the first Merkava tank than the United Nations and its backup chorus at Human Rights Watch, Physicians for Human Rights and B'Tselem began yodeling their malicious assertions that Israel was violating international law; targeting innocent civilians; shelling disproportionably; inflicting collective punishment and utilizing illegal armaments. Our troops couldn't fire a bullet anywhere in the terrorist-controlled enclave without some human rights expert flaming on CNN and the BBC that they had wounded an innocent Palestinian. A "humanitarian crisis" was announced by the UN within the opening hours of the operation and the canard was repeated daily for the next 21 days. Even before the smoke had cleared in Gaza City, UNRWA and UN Rapporteur Richard Falk had concluded that war crimes had been committed. IT SHOULD have been obvious to our leaders given their experiences in Lebanon, when similar allegations were loudly being cast and even earlier - during Operation Defensive Shield when Palestinian officials were swearing to the media that 1,500 civilians had been massacred in Jenin - that the IDF had a serious problem. A comprehensive strategy was needed to shield soldiers from criminal prosecutions. Indeed, a disaster had just narrowly been averted in the UK. On September 10, 2005, Maj.-Gen. (res.) Doron Almog was disembarking from an El Al flight in London when he was warned at the last moment by the embassy's military attachÃ© that a warrant had been issued by a British magistrate for his arrest for allegedly violating the Geneva Convention in carrying out house demolitions in Gaza. Almog remained on the plane and returned to the country unharmed. Although, British foreign minister Jack Straw eventually apologized for the incident and the warrant was canceled, IDF officers are still wary of visiting the UK. In another, better publicized affair, in 2001 prosecutors in Belgium filed a war crimes indictment against former prime minister Ariel Sharon and Maj.-Gen. (res.) Amos Yaron on allegations they were responsible for the massacre of Palestinians in Lebanon. An appeals court eventually dismissed the case, stating that no individual could be tried in absentia under Belgium law unless he was found within its territory. While pressure from the government and a diplomatic campaign managed to resolve these two incidents, the results were less than reassuring. ONE NEED only to look to the US to see what sorts of potential legislative defenses are possible. In 2002, the Rome Treaty creating the International Criminal Court (ICC) was signed by numerous countries. With American troops being sent into Iraq and Afghanistan, however, there was a growing concern in the US that its forces could be arrested and prosecuted for war crimes by the ICC. Many in the US fiercely opposed the treaty, fearing it would become a vicious tool to obstruct American foreign and military policy. The Senate passed the American Service-Members Protection Act (ASMPA) in response. ASMPA's stated purpose was to "to protect United States military personnel and other elected and appointed officials of the United States government against criminal prosecution by an international criminal court to which the United States is not party." ASMPA gave the president far-reaching powers to take action against those who might try to prosecute soldiers, especially the ICC. Most strikingly, ASMPA provides the president with "all means necessary and appropriate to bring about the release of any US or allied personnel being detained or imprisoned by, on behalf of, or at the request of the ICC." Simply stated, the law permits the president to employ military force, if necessary, to free any American soldier arrested on charges of war crimes from the custody of the ICC. It was for this reason that ASMPA has earned the nickname "The Hague Invasion Act." Furthermore, ASMPA prohibits any American governmental entity or court from cooperating with the ICC and bars the US from transferring any information to the ICC or to countries that are party to the Rome Treaty. There is no reason that the Knesset to date has not passed similar legislation designed to protect IDF soldiers from criminal prosecutions. If the US, with its tremendous international clout, its massive underwriting of the UN budget and its overwhelming foreign relations capabilities felt the need to pass ASMPA to head off war crimes prosecutions, certainly Israel should have followed its lead and passed its own defensive legislation. Relying solely upon the Foreign Ministry's competence and timely diplomatic intervention is too risky a strategy to safeguard IDF officers from the threat of an onslaught of post-Gaza indictments. The Knesset must immediately legislate a far-reaching law prohibiting any agency, court or citizen from cooperating or passing information to any war crimes tribunal. It should block access to foreign investigators, including UN special rapporteurs. The government should be empowered to utilize all necessary force to resist any effort to arrest IDF officers accused of war crimes anywhere in the world. Foreign countries should be made to understand we mean business. The author is an attorney and director of Shurat Hadin - Israel Law Center.