Standing on Israeli soil, U.S. presidential candidate Mitt Romney on Sunday declared Jerusalem to be the capital of the Jewish state and said the United States has "a solemn duty and a moral imperative" to block Iran from achieving nuclear weapons capability.

"Make no mistake, the ayatollahs in Iran are testing our moral defences. They want to know who will object and who will look the other way," he said. "We will not look away nor will our country ever look away from our passion and commitment to Israel."

The presidential election hovered over the speech. The Old City formed a made-for-television backdrop behind Romney, while some of his campaign donors listened in the audience.

Romney's declaration that Jerusalem is Israel's capital was matter-of-fact and in keeping with claims made by Israeli governments for decades, even though the United States, like other nations, maintains its embassy in Tel Aviv.

Romney met with Palestinian Prime Minister Salam Fayyad in Jerusalem on Sunday. (Charles Dharapak/Associated Press)

He did not say if he would order the embassy moved if he wins the White House, but strongly suggested so in a CNN interview.

"My understanding is the policy of our nation has been a desire to move our embassy ultimately to the capital (Jerusalem)," he said, adding, "I would only want to do so and to select the timing in accordance with the government of Israel."

His remarks on the subject during his speech drew a standing ovation from his audience, which included Sheldon Adelson, the American businessman who has said he will donate millions to help elect Romney to the White House.

Romney's embrace of Israel was on display throughout the day when he met with Prime Minister Benyamin Netanyahu and other leaders. He also visited the Western Wall, Judaism's holiest site, where he was mobbed by worshippers. In addition, Romney met with Palestinian Prime Minister Salam Fayyad.

In his remarks, Romney steered clear of overt criticism of President Barack Obama, even though he said the threat of a nuclear-armed Iran "has only become worse" in the past five years.

In an unspoken rebuttal to Obama and other critics, Romney said, "It is sometimes said that those who are the most committed to stopping the Iranian regime from security nuclear weapons are reckless and provocative and inviting war.

"The opposite is true. We are the true peacemakers," he said.

The former Massachusetts governor also stepped back from a comment a senior aide made a short while before the speech.

"We recognize Israel's right to defend itself," he told the audience. Earlier, the aide, Dan Senor, previewed the speech for reporters, saying that "if Israel has to take action on its own, in order to stop Iran from developing the capability, the governor would respect that decision."

Israel is the second of three stops on an international trip for Romney in the weeks before he claims the Republican nomination at his party's national convention in Tampa, Fla.

He flew to the Middle East from Britain, where he caused a stir by questioning whether officials there were fully prepared for the Olympic Games. A stop in Poland will complete his trip.

Four years ago, then-U.S. Sen. Barack Obama also visited Israel as a candidate, part of a five-nation trip meant to establish his own foreign policy credentials.

In his speech, Romney said Syrian President Bashar Assad "desperately clings to power" in Damascus in the face of an attempted overthrow, but he did not call for his removal.

He noted that Egypt is now headed by an "Islamist president, chosen in a Democratic election. ... The international community must use its considerable influence to insure that the new government honours the peace agreement with Israel that was signed by the government of Anwar Sadat" more than three decades ago, he said.

A goal of Romney's overseas trip is to demonstrate his confidence on the world stage, but his stop in Israel also was designed to appeal to evangelical voters at home and to cut into Obama's support among Jewish voters and donors. A Gallup survey of Jewish voters released Friday showed Obama with a 68-25 edge over Romney.

Romney and other Republicans have said Obama is insufficiently supportive of Israel, noting statements the president has made about settlements and his handling of evident Iranian attempt to develop nuclear weapons.

Iran nuclear program a major concern

Tehran is closer to developing nuclear weapons capability than before, Romney said. "Preventing that outcome must be our highest national security priority."

In a March speech before a pro-Israel lobby in Washington, Obama warned of "loose talk of war" that serves only to drive up oil prices. "Now is not the time to bluster," he said then. "Now is the time to let our increased pressure sink in and sustain the broad international coalition we have built."

It was unlikely that the day's events would settle the issue.

Obama's former press secretary, Robert Gibbs, told ABC's "This Week" that the administration has delayed Iran's nuclear program. The president has imposed U.S. penalties against Iran and worked to tougher strictures applied by other nations. There have been numerous published reports of a co-ordinated U.S.-Israeli cyberattack that caused damage to Iranian equipment vital to creating weapons-grade nuclear material.

Even so, Israeli Prime Minister Benjamin Netanyahu said before the speech that "all the sanctions and diplomacy so far have not set back the Iranian program by one iota."

Whatever the reality, the administration has taken steps in recent days to reassure Israel of its support.

Most notably, Obama approved an increase in assistance to strengthen a missile defence system that is designed to protect Israel from rocket attacks launched from the Gaza.

Senor's comments caused a stir in the hours leading to Romney's speech, a reminder of the controversy that Romney had created a few days earlier in London.

He later clarified his comments in a written statement, saying that the candidate "believes we should employ any and all measures to dissuade the Iranian regime from its nuclear course and it is his fervent hope that diplomatic and economic measures will do so. In the final analysis, of course, no option should be excluded."

Pentagon officials have spoken publicly about the difficulty of such a strike and American officials have expressed concern about the destabilizing effect such military action could have in the region, even if carried out successfully.