Breaking news from AP:

Israeli forces shelled the United Nations headquarters in the Gaza Strip on Thursday, setting fire to the compound filled with hundreds of refugees as U.N. chief Ban Ki-moon was in the region on a mission to end Israel’s devastating offensive against the territory’s Hamas rulers. Ban expressed “outrage” over the bombing. He said Israeli Defense Minister Ehud Barak told him there had been a “grave mistake” and promised to pay extra attention to protecting U.N. installations. The Israeli military had no immediate comment on the bombing, which a U.N. official said injured at least three people.

[…]

“I conveyed my strong protest and outrage to the defense minister and foreign minister and demanded a full explanation,” Ban said. He said Barak told him there had been a “grave mistake” and promised to pay extra attention to protecting U.N. installations.

The U.N. compound in Gaza had only that morning become a makeshift shelter for hundreds of Gaza City residents seeking sanctuary from relentless Israeli shelling, said a U.N. official in Gaza. He spoke on condition of anonymity because he wasn’t authorized to speak to the media.  But shortly after, a shell hit the school, wounding three people, the official said. Two other shells hit a warehouse housing humanitarian supplies and a U.N. parking lot, he said.  The U.N. compound houses the U.N. Works and Relief Agency, which distributes food aid to hundreds of thousands of destitute Gazans in the tiny seaside territory of 1.4 million people.

[…]

U.N. spokesman Adnan Abu Hasna said the U.N. had given Israel the coordinates of the building and the compound was also clearly marked with U.N. flags and logos. Large stocks of food and fuel used to supply hospital and water pumps were at risk of destruction, as were valuable U.N. archives dating back to 1948, Abu Hasna said.

Unfortunately, however, such incidents are commonplace in wartime.   Readers old enough to remember the Balkan wars of the 1990s will recall the “terrible accident” in which NATO bombers struck the Chinese embassy in Belgrade and an errant NATO HARM missile destroyed an empty house in Bulgaria — 30 miles from the country in which the missile was supposed to land!

The problem, however, is that outsiders are far less likely to excuse these sort of acts in wars they already believe to be unjust.  While a few American conservatives will be pleased, Israel’s carelessness here will only strengthen the widespread international condemnation of their heavyhandedness in this conflict.

UPDATE:  Israel is changing its story.

Israeli Prime Minister Ehud Olmert, who met with Ban later Thursday, said the military fired artillery shells at the U.N. compound after Hamas militants opened fire from the location. Three people were wounded.   “It is absolutely true that we were attacked from that place, but the consequences are very sad and we apologize for it,” he said. “I don’t think it should have happened and I’m very sorry.”

If it is verified that Hamas was illegally using a sanctuary as an outpost to conduct offensive operations, Israel is justified in firing back.  And Ban will have some explaining to do as to how that came about.

James Joyner is managing editor of the Atlantic Council.