It is an embarrassing critique for Hamas, which has used religious arguments to justify its actions.