US President Donald Trump has told Israel's Prime Minister, Benjamin Netanyahu, that Iran will never have nuclear weapons.
He suggested the Iranians thought they could "do what they want" since negotiating a nuclear deal with world powers in 2015.
Mr Trump arrived in Israel from Saudi Arabia, where he sought to win Arab states' support for fighting extremism.
He has called for a peace deal between Israel and the Palestinians.
However, he has been vague about what form it should take, saying he prefers to leave it to both sides to decide between them in direct talks.
The two-day visit to Israel forms part of Mr Trump's first foreign trip as US president.
What exactly did Trump say about Iran?
Speaking in Jerusalem, he said Iran had negotiated a "fantastic deal" with his predecessor, Barack Obama, winning "a lifeline and prosperity".
But "instead of saying thank you", the Iranians were backing terrorism, he said. In a speech earlier on Monday, he accused Iran of "deadly funding, training and equipping of terrorists and militias".
"Iran will never have nuclear weapons, that I can tell you," Mr Trump told Mr Netanyahu.
In a deal with world powers in 2015, Iran accepted curbs on its nuclear programme in return for tangible economic benefits, and the White House confirmed last month that the deal was still holding.
Iranian President Hassan Rouhani, who was re-elected for a second term last week, championed the 2015 deal but on Monday he appeared to sweep aside international concern about Iran's missile programme.
"The Iranian nation has decided to be powerful," he said on state TV. "Our missiles are for peace and for defence... American officials should know that whenever we need to technically test a missile, we will do so and will not wait for their permission."
Mr Rouhani also played down Mr Trump's strong criticism of Iran at a summit in Saudi Arabia at the weekend, saying: "Who can say regional stability can be restored without Iran?"
Even harder than Mid-East peace? Analysis by Siavash Ardalan, BBC Persian
Forging an anti-Iranian alliance between Israel and Saudi Arabia may prove an easier task for President Donald Trump than bringing peace between Israel and the Palestinians.
Having focused on a bitterly contested election, Iranian leaders are now at least ostensibly playing down the emerging threat from a new US administration that has virtually put Iran back in the "axis of evil" box.
President Rouhani described Mr Trump's massive arms deal with Saudi Arabia as having "no practical value" and Iranian Foreign Minister Javad Zarif questioned rhetorically whether the push by the Americans constituted a new foreign policy or just "milking Saudis" for hundreds of billions of dollars.
Even though any possibility of a military confrontation is not imminent, a tough US stance against Iran could make it much more difficult for the moderate Hassan Rouhani to do business with the outside world, and therefore deliver on his promise of a better economic future for the country.
Can Trump's trip bring peace any closer?
Speaking about the prospect of a peace deal between Israel and the Palestinians, Mr Trump said, "I've heard it's one of the toughest deals of all".
But he added that he had a "feeling that we're going to get there eventually".
President Trump believes he is the world's greatest dealmaker and making peace between Israelis and Palestinians after a century of conflict would be the world's biggest deal, writes Jeremy Bowen, the BBC Middle East editor.
During the US election, candidate Trump expressed views that seemed to fit neatly with those of the right-wing Israeli government of Mr Netanyahu - favouring expansion of Jewish settlements on occupied territory and a tough line towards Palestinian aspirations for independence.
But in office, President Trump has been more nuanced - so there has been some nervous speculation on the Israeli right that he might demand concessions from their side, our editor says.
But most people, on both sides of the argument, are deeply sceptical about the chances of any progress, no matter what President Trump says or does while he is here, our editor adds.
Israel and the Palestinians have not held direct talks in just over three years.
Mr Trump is due to meet Palestinian leader Mahmoud Abbas in Bethlehem on Tuesday.
Where did Trump go in Jerusalem?
Before meeting Mr Netanyahu, he visited the Church of the Holy Sepulchre where - site of Jesus's burial and resurrection, according to Christian tradition.
Then, wearing a Jewish skullcap as a mark of respect, he visited the Western Wall, one of the most sacred sites in Judaism.
The wall is a remnant from the time of the Second Jewish Temple, which stood on the plateau above it and was destroyed by the Romans in 70 AD.
Mr Trump could be seen placing what appeared to be a written note between its stones, as is the custom among visitors to leave notes with prayers and requests to God.
Have Trump's domestic troubles pursued him abroad?
The president's visit was overshadowed by political difficulties at home.
Speaking to Mr Netanyahu on Monday, he sought to dispel suggestions that he had passed on sensitive Israeli intelligence to Russian diplomats at a recent meeting, saying he had not mentioned the word "Israel" at the meeting.
Latest reports from the US say Mr Trump's former National Security Adviser, Michael Flynn, will refuse to give evidence to the Senate Intelligence Committee after being subpoenaed in connection with Moscow's possible involvement in last year's presidential election.
What's the next leg of President Trump's tour?
He will be in Rome to meet Pope Francis and Brussels to see Nato leaders.
On Friday, he will return to Italy for to meet other world leaders at a G7 summit in the Sicilian town of Taormina, where climate change is expected to be discussed.
- Monday, 22 May: Jerusalem
- Tuesday, 23 May: Bethlehem and Jerusalem
- Wednesday 24 May: Rome and Brussels. Mr Trump will meet Pope Francis, then Belgian officials
- Thursday, 25 May: A Nato meeting in Brussels
- Friday, 26 May: Sicily, for a summit of G7 members