David Cameron
David Cameron said it is wrong for Israel to target civilians "if that's what's happened".Oli Scarff, pool/Reuters

UK prime minister David Cameron has refused to be drawn on whether he believes Israel has broken international law by shelling a UN-run school in Gaza.

Cameron has been criticised by Labour leader Ed Miliband for not publicly speaking out against Israel for the "unacceptable and unjustifiable" civilian deaths during the Gaza conflict.

Following the shelling of a UNRWA school in Rafah in which at least 10 people died, UN general secretary Ban Ki-Moon described the attack as a "moral outrage" and a "gross violation" of international law.

While Cameron did not directly condemn Israel for its actions in Gaza, he told the BBC the UN was "right to speak out in the way that it has".

Cameron stopped short of describing the shelling as a criminal act, but agreed with the UN's concerns and the described the loss of life as "appalling".

He told BBC News: "I think the UN is right to speak out in the way that it has, because international law is very clear that there must not be the targeting of civilians or the targeting of schools if that is what has happened."

Asked whether he agreed with the UN secretary-general's view that the attack was a breach of international law, Cameron replied: "I'm not an international lawyer, so that's up to international lawyers.

"But international law is very, very clear that the use of force always has to be proportionate and civilians should not be targeted. We obviously do think it is appalling the loss of life that there has been."

He added: "From the start, though, we have also made the point that if the Hamas rocket attacks on Israel stop then that would be probably the fastest way to stop this conflict."

Miliband was accused of "playing politics" after demanding the government send a "much clearer message" to Israel following the deaths of more than 1,800 people in Gaza.

In a statement, Miliband said Cameron is right to say Hamas is an "appalling, terrorist organisation" but condemned his "inexplicable" silence over Israel.

He added: "[Hamas's] wholly unjustified rocket attacks on Israeli citizens, as well as building of tunnels for terrorist purposes, show the organisation's murderous intent and practice towards Israel and its citizens.

"But the prime minister is wrong not to have opposed Israel's incursion into Gaza and his silence on the killing of hundreds of innocents Palestinians civilians caused by Israel's military action will be inexplicable to people across Britain and internationally."

Justice secretary Chris Grayling said the best course of action for the government is to work in a way which "encourages an end to the action on both sides".

He told Sky News: "We all want to see an end to this conflict, we want to see a proper ceasefire. We want to see an end to military action on both sides. And we want to see long-term peace in the region."