US Republican presidential candidate Mitt Romney has said his country has a "moral imperative" to stop Iran from developing nuclear weapons.
Mr Romney, speaking during a visit to Jerusalem, said Iran was the most destabilising country in the world.
He said the US recognised Israel's right to defend itself and that it was right for the US to stand with Israel.
Mr Romney also referred to Jerusalem as Israel's "capital" - senior Palestinian officials said this was "unacceptable".
In his speech in front of Jerusalem's Old City, Mr Romney said Iran's leading ayatollahs were "testing our moral defences".
"They want to know who will object and who will look the other way. We will not look away nor will our country ever look away from our passion and commitment to Israel."
He said Iran was "the most destabilising nation in the world" and that the US had "a solemn duty and a moral imperative to deny Iran's leaders the means to follow through on their malevolent intentions".
Earlier, one of Mr Romney's top advisers, Dan Senor, had said the presidential candidate would respect any decision by Israel to use military force against Iran.
US President Barack Obama has focused on using sanctions to contain Iran's nuclear ambitions.
While not directly referring to military force, Mr Romney said the US should "employ any and all measures to dissuade the Iranian regime from its nuclear course."
"It is our fervent hope that diplomatic and economic measures will do so. In the final analysis, of course, no option should be excluded."
Opening his speech, Mr Romney referred to Jerusalem as Israel's capital, something the current US administration and most of the international community do not do.
"It is a deeply moving experience to be in Jerusalem, the capital of Israel," he said.
Israel claims the entire city but the Palestinians want the eastern part of Jerusalem to be the capital of a future Palestinian state.
The chief Palestinian negotiator in peace talks, Saeb Erekat, said the reference was "unacceptable and we completely reject it",
"Romney's declarations are harmful to American interests in our region, and they harm peace, security and stability," he told the AFP news agency.
Earlier on Sunday, Mr Romney held talks with Israeli Prime Minister Benjamin Netanyahu and President Shimon Peres.
He told Mr Peres he shared Israel's concern about the development of Iran's nuclear capabilities, saying: "The threat it would pose to Israel, the region and the world is incomparable and unacceptable."
After his meetings with Israeli officials, he went to Jerusalem's Western Wall, one of Judaism's holy sites.
Mr Romney will be hoping that burnishing his pro-Israel credentials will help him among key constituencies in a tight race with Mr Obama, analysts say.
Mr Romney says Mr Obama has undermined Israel and supported its enemies.
The Republican presidential hopeful also met Palestinian Prime Minister Salam Fayyad, though not Palestinian President Mahmoud Abbas.
'Islamist winter' fears
While not explicitly ruling out military intervention, President Barack Obama's policy has emphasised non-military means of putting pressure on Iran.
The BBC's North America editor Mark Mardell says Mr Romney is highly critical of the international talks taking place which might lead to Iran being allowed to enrich some uranium. Mr Romney wants zero enrichment.
The first leg of Mr Romney's trip, in London, was marred by controversy.
After talking of "disconcerting" signs in London's preparations for the Olympic Games, Mr Romney backtracked and predicted a "very successful" Olympics.
In a photo opportunity before his talks with Mr Fayyad, Mr Romney said the opening ceremony had been "spectacular" and praised the fact that for the first time, every country has sent women to compete.