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.
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?”