(Adds Olmert reaction, paragraphs 13-14)
WASHINGTON, June 4 (Reuters) - Barack Obama toughened his terms for diplomacy with Iran and backed Israel's stance on Jerusalem on Wednesday in his first foreign policy speech since capturing the Democratic nomination for U.S. president.
The Illinois senator vowed to stop Iran from acquiring a nuclear weapon and insisted Jerusalem should be the undivided capital of the Jewish state in a speech to the American Israel Public Affairs Committee, a pro-Israel lobby group.
Obama, who clinched the nomination on Tuesday, has faced wariness among Jewish voters over his commitment to Israel, buoyed partly by a rumor campaign suggesting he is a Muslim and that his advisers have a pro-Arab bent.
Obama, a Christian, vowed in his speech to work for peace with a Palestinian state alongside Israel. His campaign has tried to dispel suggestions he might pressure Israel in negotiations more than his rival, Republican Sen. John McCain.
"Let me be clear. Israel's security is sacrosanct. It is nonnegotiable. The Palestinians need a state that is contiguous and cohesive, and that allows them to prosper," Obama said.
"But any agreement with the Palestinian people must preserve Israel's identity as a Jewish state, with secure, recognized and defensible borders. Jerusalem will remain the capital of Israel, and it must remain undivided," he said.
Israel calls the city its undivided and eternal capital, but this status has never been recognized internationally. Palestinians want East Jerusalem, captured by Israel in 1967, for a future capital.
The issue is central to peace negotiations President George W. Bush hopes to conclude before he steps down in January. Americans elect his successor on Nov. 4.
Obama alluded to the rumor campaign in his speech.
"All I want to say is -- let me know if you see this guy named Barack Obama, because he sounds pretty frightening," joked Obama, appearing upbeat after winning the nomination battle against Democrat Hillary Clinton.
Obama supported Israel's efforts to renew talks with Syria over the Golan Heights and backed its September airstrike on a site in Syria that Israel claims was aimed at pursuing nuclear weapon, which Syria denies.
"Syria has taken dangerous steps in pursuit of weapons of mass destruction," Obama said.
Israeli Prime Minister Ehud Olmert, on a three-day visit to Washington, welcomed Obama's comments.
"Barack Obama's appearance was very impressive and his remarks on Jerusalem were very touching," Olmert said. "If he is elected president, we will discuss with him all the issues on the agenda."
McCain has been assailing Obama over statements suggesting willingness to talk directly to Iranian President Mahmoud Ahmadinejad, who has called for Israel's elimination.
Obama has since said he would not guarantee a meeting with the Iranian president. He went further to AIPAC.
"We will open up lines of communication, build an agenda, coordinate closely with our allies, and evaluate the potential for progress," Obama said of potential talks with Tehran.
"I have no interest in sitting down with our adversaries just for the sake of talking," he said.
"But as president of the United States, I would be willing to lead tough and principled diplomacy with the appropriate Iranian leader at a time and place of my choosing if and only if it can advance the interests of the United States."
Obama termed danger from Iran in the Middle East "grave."
"I will do everything in my power to prevent Iran from obtaining a nuclear weapon, everything in my power to prevent Iran from obtaining a nuclear weapon -- everything," he said to a standing ovation.
McCain promised at AIPAC on Monday to pursue tougher financial sanctions on Iran if he became president. He called for a worldwide divestment campaign aimed at curbing Iran's nuclear ambitions.
Clinton, who has not yet conceded, also spoke at the conference and voiced strong support for Israel.
Editing by Howard Goller and Patricia Zengerle
Our Standards: The Thomson Reuters Trust Principles.