(Adds details from Israeli army statement and UNWRA spokesman)
UNITED NATIONS, Jan 7 (Reuters) - A senior U.N. official denied on Wednesday that any Hamas militants were inside a U.N.-run school in Gaza where Israeli shelling killed more than 40 people on Tuesday.
The Israeli army accused Hamas of using civilians as "human shields" and said its troops had returned fire after gunmen mortared their positions from within al-Fakhora school in Jabalya refugee camp.
Citing intelligence reports, it named two men it said were Islamist gunmen killed in the attack.
John Ging, director of operations in Gaza for UNRWA, the United Nations Relief and Works Agency, told reporters at U.N. headquarters by videolink that he had visited the Jabalya school during a three-hour lull in fighting on Wednesday.
"I was reassured by the management of the school, my own staff, senior, experienced, long-serving staff, that there were no militants in the school," Ging said.
"I am very confident now that there was no militant activity inside the school nor militants in the school," Ging said, reiterating a call for an independent investigation.
"If anybody has evidence to the contrary, then let’s bring it forward," Ging said.
A spokesman for UNWRA separately told Reuters that 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.
"This is an extremely important distinction because we have been accused of very serious allegations that our premises were being used to fire rockets," spokesman Chris Gunness said.
The Israeli army said on Wednesday it stood by its statement of the day before in which said mortars had been fired "from within" the school, but then issued another statement dropping the word "within" to say "mortar fire from" the school.
Speaking at the same news conference as Ging, John Holmes, the top U.N. humanitarian official, said the latest casualty figures from the school were 43 dead and 100 injured.
The casualties included people who had taken refuge inside the school and residents of nearby buildings.
(Reporting by Claudia Parsons and Luke Baker; Editing by Jon Jon Boyle)