Israel's military said Saturday it had ended its raid on "a Hamas command centre" in a north Gaza hospital and had detained its director, accusing him of being a Hamas operative.