The Hungarian prime minister has said his country made a “mistake” and “committed a sin” by collaborating with Nazis and failing to protect its Jewish population during the war.

Viktor Orban’s comments, made during a joint press conference with Benjamin Netanyahu, his Israeli counterpart appeared to be an attempt to bury recent allegations of anti-Semitism aimed at the Hungarian government after a state-run anti-immigration billboard campaign that featured a picture of George Soros, the Hungarian-born Jewish billionaire.

“During World War II, Hungary did not comply with this moral and political requirement. This is a sin because at the time we decided that instead of protecting the Jewish community, we chose collaboration with the Nazis,” he said. “I made it clear to the prime minister that this can never happen again. In the future, the Hungarian government will protect all its citizens.”

The visit by Mr Netanyahu, the first by an Israeli prime minister to Hungary since the end of communism in 1989, has been overshadowed by the scandal surrounding the Soros posters.

Budapest claims Mr Soros threatens Hungarian national security by promoting mass migration, but critics say the posters carry dark echoes of the anti-Semitic campaigns of the 1930s and they have caused consternation in Hungary’s Jewish population.

Andras Heisler, a spokesman for the Federation of Hungarian Jewish Communities, said it was "unacceptable for us that the Jews are afraid due to the hate campaign and to the hate speech.”

“Jews fear the consequences of the hate campaign [by] the government,” he added.

He also said Mr Netanyahu’s visit provided the Hungarian government with a “sort of an acquittal regarding anti-Semitism and the stamp of being far-right.”

In his brief speech Mr Netanyahu made no reference to the scandal surrounding the poster campaign,

Before he landed in Budapest on Monday the Israeli government had sided with Hungary saying that Mr Soros was “continuously undermining” Israel’s government, although it also stressed it deplored any form of anti-Semitism.

The Israeli prime minister will meet Hungarian Jews on Wednesday in what promises to be a tense meeting, and hold talks with other Central European prime ministers.