Jeremy Zeid, a Ukip candidate in Britain’s 2015 election, has been replaced after writing on Facebook that Israel should “kidnap” Barack Obama.

The post by Zeid was a response to the declassifying of US federal government documents on Israel’s secret nuclear programme and was written last week as he prepared to run for a seat in the election on 7 May.

“Once Obama is out of office the Israelis should move to extradite the bastard or ‘do an Eichmann’ on him and lock him up for leaking state secrets,” Zeid wrote in the Facebook post, according to a screenshot.

“Just kidnap the bugger, like they did to Eichmann,” he added in a comment, referring to the Nazi war criminal Adolf Eichmann, who was captured in Argentina in 1960 and put on trial in Israel.

Ukip, known for its anti-immigration and anti-European Union stance, has suffered a series of embarrassments over gaffes by members and several of its candidates have withdrawn.

In comments to the Evening Standard newspaper Zeid defended his comments and said his resignation was not linked to the post.

“I stood down because I’m fed up with having to fend off accusations. I have to consider my health. That comment I made about Obama, I stick by it 100%,” Zeid told the newspaper.

Ukip said Zeid had been replaced and a new candidate, dentist Raymond Shamash, would contest the constituency of Hendon in north London.

A spokesman said that the party had only learned of the Facebook post after Zeid’s resignation. “He was right to resign. We are looking forward, not back,” the Ukip spokesman said.