Palestinians said Israel deliberately targeted civilians at the school
Israeli defence officials are now saying one of the deadliest recent incidents in Gaza, when a UN school was bombed, was caused by a stray mortar.
The attack killed about 40 Palestinian civilians sheltering at the Fakhura school in Jabaliya on Tuesday.
Initially, Israeli officials accused Hamas of firing from the school and using civilians as "human shields".
The UN has called for an independent investigation and for criminal charges to follow if culpability is discovered.
UN Secretary-General Ban Ki-moon expressed "deep dismay" that Fakhura school, and two other UN-run schools in Gaza, had been hit by Israeli fire despite the army having been given precise details of school locations.
Quoted by Haaretz newspaper on Sunday, the army said Hamas militants had fired from near the school - rather than within it - and its troops responded with three mortars.
Two were accurate, the army claimed, but one landed 30 metres off target. It was that mortar that caused the carnage at Fakhura school, the army said.
The statement was made anonymously to the media because the investigation had not yet been made public by the military, Haaretz and news agencies reported.
The dropping of the defence that Hamas mortars had come from within the school compound may cause some embarrassment to Israel in what has been a high profile incident.
The initial "human shield" claim was made forcefully after the killings by the military, politicians and many supporters of Israel.
"Hamas cynically uses civilians as human shields," the military said in its initial statement, and later it went as far as naming two well-known Hamas militants among those killed at the school.
Israeli government spokesman Mark Regev called the incident "a very extreme example of how Hamas operates".
It is not clear what credibility the change of position will be given by observers.
Two days after the incident, a UN spokesman said the Israeli army, in private meetings with diplomats, had admitted that the mortar fire came from outside the school compound and not from within it - but this was not confirmed by Israeli officials.
Palestinian doctors say 879 Palestinians have been killed since the Israeli offensive - to stamp out rocket fire by Gaza militants - began on 27 December.
Norwegian doctors in Gaza's main hospital said about half the casualties they have seen are civilians. Thirteen Israelis - 10 soldiers and three civilians - have died during the offensive.
Update: In February 2009, the United Nations said that a clerical error had led it to report that Israeli mortars had struck a UN-run school in Jabaliya, Gaza, on 6 January killing about 40 people. Maxwell Gaylord, the UN humanitarian co-ordinator in Jerusalem, said that the Israeli Defense Force mortars fell in the street near the compound, and not on the compound itself. He said that the UN "would like to clarify that the shelling and all of the fatalities took place outside and not inside the school".