BIARRITZ, France- U.S. President Donald Trump appeared to leave a window open for diplomacy with Iran on Monday after French President Emmanuel Macron flew in Iran's foreign minister to a G7 summit in an effort to reduce U.S.-Iranian tensions.

European leaders have struggled to tamp down the brewing confrontation between Iran and the United States since Trump pulled Washington out of world powers' 2015 nuclear deal with Tehran and reimposed sanctions on the Iranian economy.

But Macron has spent the summer trying to create conditions for a period of pause to bring the two sides backs to the negotiating table.

Those efforts took a surprise turn on Sunday when Iranian Foreign Minister Mohammad Javad Zarif, who is under U.S. sanctions, flew to the French seaside town of Biarritz where the Group of Seven leaders were meeting.

Zarif held talks with Macron and British and German officials before returning home. Though potentially a diplomatic minefield, Macron's gamble with Zarif appears to have worked out for now, as Trump on Monday endorsed the French president's initiative and toned down his usual harsh rhetoric on Tehran.

While Trump reaffirmed Washington's goal of extracting farther-reaching security concessions from Iran, he told reporters at the summit he wanted to see "a really good Iran, really strong, we’re not looking for regime change.

"I knew (Zarif) was coming in and I respected the fact that he was coming in. We're looking to make Iran rich again, let them be rich, let them do well, if they want," Trump said.

The 2015 deal between Iran and six world powers, reached when Trump's predecessor Barack Obama was in office, aimed to curb Iran's disputed uranium enrichment programme in exchange for the lifting of many international sanctions on Tehran.

Since ditching the deal last year, Trump has pursued a policy of "maximum pressure" to try to force Iran into broader talks to restrict Iran's ballistic missile programme and end its support for proxy forces around the Middle East as well.

While Trump's European allies also want fresh negotiations with Iran, they believe the nuclear deal must be upheld to help ward off the risk of wider war in the Middle East. Macron had already met Zarif in Paris on Friday ahead of the G7.

"What we want is very simple. It's got to be non-nuclear (as well)," Trump said. "We’re going to talk about ballistic missiles..., about the timing. But they (Iran) have to stop terrorism. I think they are going to change, I really do."

He said that he had not wanted to meet Zarif himself, because it was too soon.

The Iranian leadership also appeared upbeat. "Road ahead is difficult. But worth trying," Zarif said in a tweet.

"Those who imagine one hand is enough are mistaken. We have to use our military, cultural and economic power as well as political power, diplomacy and negotiation,” President Hassan Rouhani said on his official website.

OBSTACLES AHEAD

Beyond the symbolism of Zarif coming and Trump appearing to endorse the step, it is unclear whether real progress was made.

In response to the tougher U.S. sanctions and what it says is the failure of European powers party to the deal - France, Britain and Germany - to compensate it for revenues lost to U.S. sanctions, Iran has responded by retreating from some of its commitments to limit its nuclear activity.

It has given the Europeans until Sept. 5 to come up solutions before scaling back those commitments further.

Macron wants to either create a compensation mechanism for Iran or convince Trump to ease some of the U.S. oil sanctions.

In return for any concessions he would expect Tehran to return to full compliance with the nuclear deal and engage in negotiations covering its ballistic missiles, regional influence and its nuclear activity after 2025, when the deal expires.

Highlighting the difficulties, two Iranian officials and one diplomat told Reuters on Sunday that Tehran wants to export a minimum of 700,000 barrels per day of its oil and ideally up to 1.5 million bpd if the West seeks to negotiate with Tehran to save the nuclear deal.

One of the Iranian officials also reiterated Tehran's stance that the ballistic missile programme is non-negotiable.

The United States has made no indication that it will ease any of its sanctions. A European diplomat familiar with the G7 discussions said the leaders had not persuaded Trump to budge.

"In sum, the French offers and Iranian demands have frankly shifted little over the past four months," said Eurasia Group Iran analyst Henry Rome. "Meanwhile, we’re 11 days away from Iran’s expected new nuclear escalation."

(Additional reporting by Marine Pennetier, Michel Rose and Babak Dehghanpisheh in Geneva Writing by John Irish Editing by Mark Heinrich) ((crispian.balmer@thomsonreuters.com; +390685224351; Reuters Messaging: crispian.balmer.reuters.com@reuters.net))