The Israeli army claimed the school, run by the UN's relief agency for Palestinian refugees, was occupied by Hamas militants.