JERUSALEM  - Germany is "very concerned" about Iran's nuclear programme which not only threatens the Middle East but could also pose a threat to Europe, German President Joachim Gauck said in Jerusalem on Tuesday.

"I'm very concerned about Iran's nuclear programme. It represents not only a concrete danger for Israel but for the whole region and potentially even for us in Europe," he said upon meeting his Israeli counterpart Shimon Peres.

But he stressed that Berlin was committed to finding a diplomatic solution to the impasse over Iran's nuclear programme which Israel and much of the West believes is a bid to develop an atomic bomb.

"Germany is committed to a diplomatic solution based on sanctions," he said, referring to the regime of biting sanctions imposed on Tehran by Washington, the United Nations and the European Union. Peres said that Iran was threatening a new Holocaust against Israel. "Iran's (nuclear) policy is casting a shadow over the whole region. They are actually building a nuclear weapon. This weapon is a threat for the whole world," he said.

"Iran's president (Mahmoud Ahmadinejad) is threatening a new Shoah. We cannot ignore that," he said, using the Hebrew word for the Holocaust.

The German head of state, who arrived on Monday afternoon, also reiterated Berlin's commitment to the security of Israel.

"The commitment to Israel's security and right to exist is a determining factor of Germany's politics," he said.

During the morning Gauck also visited Jerusalem's Yad Vashem Holocaust museum and was to meet members of the 1972 Israeli Olympic team who survived an attack by Palestinian militants at the Munich Games exactly 40 years ago.

Later on Tuesday he was to meet Israeli Foreign Minister Avigdor Lieberman and Opposition leader Shelly Yachimovich, an official statement said.

Israel says an atomic Iran would pose an existential threat to the Jewish state and has refused to rule out the option of a pre-emptive military strike on its nuclear facilities.