Trump is willing to meet Iranian President to end nuclear stand-off
French President Emmanuel Macron paved the way at the G7 summit for a diplomatic solution to the standoff between Washington and Tehran over the 2015 nuclear deal.
Mr Macron said that Iranian President Hassan Rouhani had told him he was open to a meeting with US President Donald Trump.
Mr Trump told a news conference before heading home that it was realistic to envisage a meeting with the Iranian head of government in the coming weeks.
Both leaders are scheduled to attend the United Nations General Assembly next month.
European leaders have struggled to calm a confrontation between Iran and the United States since Mr Trump pulled his country out of Iran's internationally brokered 2015 nuclear deal last year and reimposed sanctions on the Iranian economy.
"What unites us, and that is a big step forward, is that we not only don't want Iran to have nuclear weapons, but we also (want to) find the solution to that via political means," German Chancellor Angela Merkel said at the end of the gathering.
Mr Macron has led efforts to defuse tensions, fearing a collapse of the nuclear deal could set the Middle East ablaze.
Mr Trump ruled out lifting sanctions but said talks were underway to see how countries could open credit lines to keep Iran's economy afloat.
He indicated he wanted to address the nuclear deal's timescale and said he did not want regime change.
"I'm looking at a really good Iran, really strong, we're not looking for regime change," he said. "And we're looking to make Iran rich again, let them be rich, let them do well."
But, apparently referring to Iran's recent rhetoric about its ability to attack US interests, Mr Trump suggested Iran would meet "violent force" if it followed through on its threats.