US President Donald Trump said he was prepared to meet his Iranian counterpart Hassan Rouhani in the next few weeks, after talks over Tehran’s nuclear program at a G7 summit in France.

Iranian Foreign Minister Mohammad Javad Zarif made a surprise appearance on the sidelines of the summit in Biarritz on Sunday at the invitation of French President Emmanuel Macron.

Macron said that the “conditions for a meeting” between Trump and Rouhani to take place “in the next few weeks” had been created through intensive diplomacy and consultations.

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

“If the circumstances were correct, I would certainly agree to that,” Trump said at a joint press conference with Macron.

Asked by reporters if he thought the timeline proposed by his French counterpart sounded realistic, Trump replied: “It does,” adding that he thought Rouhani would also be in favor of it.

“I think he’s going to want to meet. I think Iran wants to get this situation straightened out,” Trump added.

“At a given point in time, there will have to be a meeting between the American and Iranian president,” Trump said.

He also called Rouhani a “great negotiator.” And he indicated he might be open to Iran being offered “a short-term line of credit or loan” to help its economy. “We’re talking about a letter of credit,” he specified. “It would be from numerous countries.” Tehran “may need some money to get over a very rough patch” caused by US economic sanctions, he explained.

Trump said he gave his approval for the invitation to Iranian Foreign Minister Mohammad Javad Zarif, despite new US sanctions against the envoy.

Macron and other G7 leaders opposed Trump’s decision last year to pull the United States out of a 2015 nuclear deal between Iran and world powers, and to impose new sanctions. They have been trying to salvage the painstakingly negotiated treaty ever since.

Tensions over Iran, Russia, the US trade war with China and the faltering global economy dominated the three-day summit. Trump insisted the gathering was marked by absolute unity, which was true to the extent that the other leaders carefully sidestepped any differences with him.

The biggest risk was the invitation to Zarif, which Macron’s office said came together in a matter of hours.

“I said if you want to do that, that’s OK. I don’t consider that disrespectful at all. Especially when he asked me for approval,” Trump said.

Trump has put in place a policy of “maximum pressure” on Tehran over its disputed nuclear program via crippling sanctions that are seen as raising the risk of conflict in the Middle East.

Rouhani defended Zarif’s Biarritz visit in a speech aired live on state television on Monday.

“I believe that for our country’s national interests we must use any tool,” he said.

But hardliners have criticized the initiative, with the ultra-conservative Kayhan newspaper saying the trip was “improper” and sent “a message of weakness and desperation.”

Macron has urged the US administration to offer some sort of sanctions relief to Iran, such as lifting sanctions on oil sales to China and India, or a new credit line to enable exports.

In return, Iran would return to complying with the 2015 deal.

Commenting on the talks about Iran at the G7, German Chancellor Angela Merkel said: “It’s a big step forward. Now, there is an atmosphere in which talks are welcomed ahead. We must not lose opportunities.”