DNIPRO, Ukraine — When Volodymyr Zelensky, the Jewish comedian recently elected the president of Ukraine, announced that he was running, the chief rabbi for the eastern Ukrainian region where Mr. Zelensky grew up was shocked by the hostile reaction.

But the opposition, Rabbi Shmuel Kaminezki said, did not come from the Orthodox Church, a bastion of anti-Semitism in the past, or from a Ukrainian nationalist movement that collaborated with the Nazis during Hitler’s invasion of the Soviet Union. They could not seem to care less that Mr. Zelensky was a Jew, the rabbi recalled.

Instead, the hostility came from Mr. Zelensky’s fellow Jews, both secular and religious, for whom painful memories of czarist-era pogroms and the Holocaust are still very much alive.