An ultra-Orthodox Jewish man who was convicted of offering to spy for Iran was sentenced to a four-and-a-half-year prison term by the Jerusalem District Court on Tuesday.

Yitzhak Bergel, a 46-year-old a member of the anti-Zionist fringe group Neturei Karta, met with Iranian officials at their embassy in Berlin in 2011.

Bergel attempted to enter the embassy on January 17, but found it to be closed. Returning the following day, he was shepherded into an inner room at the embassy and there met with three unidentified men.

He told the Iranian officials that he denies the existence of the State of Israel and offered to spy for Iran. He also explained to the officials that he was not interested in asylum, and was “willing to murder a Zionist.”

The Iranian officials gave Bergel a note with an email address where they said he would find a message. They also asked him to maintain telephone contact with them.

Three days after the meeting, Bergel returned to Israel and began to check the email account repeatedly, and even attempted to contact someone named “Haji Baba” by phone.

Bergel was arrested in mid-July. As part of a plea bargain, he confessed to charges of treason and contacting a foreign agent.

During his investigation, Bergel expressed regret over the incident, and said that though he believed “the State of Israel is forbidden by the Torah,” he was glad that his plan “was not finalized,” Channel 2 News reported.

Several years before reaching out to Iranian officials, Bergel served in the Israel Defense Forces but was released for reasons of mental health.

The anti-Zionist, ultra-Orthodox Neturei Karta sect holds a theological view that sees the founding of the State of Israel as a violation of God’s plan for history.

In 2006, members of the sect visited Iran to take part in a conference hosted by President Mahmoud Ahmadinejad which sought to “re-examine the Holocaust.”

The group was widely condemned for the visit, which was designed to lend a sheen of respectability to Holocaust denial efforts by the Iranian regime.

Haviv Rettig Gur contributed to this report