Angela Merkel, Germany's chancellor, told Israel's parliament yesterday that the Holocaust filled her people with shame and promised a closer relationship with the Jewish state.

About 1,000 people gathered in the Knesset in Jerusalem to hear the 20-minute speech and gave Merkel a standing ovation. Five MPs stayed away in protest, saying they did not want to hear German in the Knesset, an indication that there are some in Israel who oppose the warming of relations between the two countries.

Merkel, 53, was the first German chancellor to be invited to address the parliament and spoke directly about the Nazi legacy. "The mass murder of 6 million Jews, carried out in the name of Germany, has brought indescribable suffering to the Jewish people, Europe and the entire world," she said.

"The Shoah fills us Germans with shame," she said, using the Hebrew word for the Holocaust. "I bow to the victims. I bow to all those who helped the survivors."

During her three-day visit, Merkel and Ehud Olmert, Israel's prime minister, reached an agreement on joint investment, military cooperation and other projects in science and research. They also discussed Iran's nuclear programme on which Israel has been pressing its allies to take a tough stance.

"Germany is setting its sights on a diplomatic solution, together with its partners," Merkel told the Knesset. "The German government will, if Iran does not give in, continue to resolutely defend sanctions ... The threats the Iranian president is launching against Israel and the Jewish people are without doubt a particular cause for concern.

"His repeated vilifications and the Iranian nuclear programme are a danger to peace and security. If Iran gained access to the atomic bomb, this would have devastating consequences ... This must be prevented." Olmert described Merkel as a "constant friend".

Officially her visit has been a major undertaking, with the German flag flown over the Knesset building and a joint session of the Israeli and German cabinets in Jerusalem. Yet the Israeli press has said little on the trip or on the warming ties even though it appears to signal a markedly new engagement between the two countries.

"It is quite extraordinary that she radiates so much friendship and support for the government of Israel," the Israeli historian Tom Segev told Associated Press. "The public discourse in Germany is much more critical of Israel than she is. I don't really remember a time when Germany so wholeheartedly and uncritically stood by the government of Israel."

There was some dissent. Anat Peri, an Israeli academic, wrote in the rightwing Makor Rishon-Hatzofe newspaper yesterday about concern over Germany's continuing trade with Iran and the country's reluctance to endorse military action against Tehran. "I have a profound suspicion that this policy is not motivated only by economic and political interests, but also expresses a deep hostility to the Jewish people, and identification with those who threaten to destroy Israel, in the hearts of many Germans, in spite of the official declarations of support for Israel," Peri wrote.

Israel and Germany established diplomatic relations in 1965 and Germany has paid $39.4bn to Holocaust survivors in Israel. Merkel did not visit the Palestinians on her trip, although Germany will host a joint peace conference later in the year. She spoke in support of the struggling peace process, but was careful not to voice strong criticism of Israel's policies.