US President Donald Trump and German Chancellor Angela Merkel held a joint press conference in Washington during her visit.
Trump reiterated his stance that Tehran should not be able obtain a nuclear weapon, but refused to discuss any military options to that end.
"I can tell you this, they will not be doing nuclear weapons. That I can tell you. OK? They are not going to be doing nuclear weapons. You can bank on it. "
Regarding Pyongyang, he said he expected his upcoming meeting with North Korean leader Kim Jong Un to be productive but declared that Washington would continue apply pressure on the Asian country to ensure its denuclearization.
"In pursuit of that goal, we will not repeat the mistakes of past administrations. Maximum pressure will continue until denuclearization occurs. I look forward to our meeting. It should be quite something."
He said he was encouraged by the historic meting between Kim and his South Korean counterpart for peace talks Friday. The American president said he had a responsibility to see if he could close a deal on North Korea.
Trump also said he was committed to remedying US-Europe trade imbalances, a frequent target of his ire, and called on Middle East countries to step up contributions to the fight against Daesh.
Trump noted that he might participate in the opening of the controversial new US embassy to Israel in Jerusalem.
Merkel said she wanted to see Iran's influence curbed, and a nuclear-free zone established on the Korean Peninsula.
The chancellor suggested she could see negotiating a bilateral trade agreement with Washington and described the United States as an interesting place for investment.
Merkel said no one was interested in having a bad relationship with Moscow, and said Germany was working with the US on assessing the effect of anti-Russia sanctions.