He had threatened to cancel the election if Israel barred voting in East Jerusalem , to protest the inclusion of candidates from the Hamas militant group .