The military says soldiers shot the militant after he attacked an Israeli patrol .