Iran's top diplomat has held talks with France's President Emmanuel Macron at the sidelines of the G7 summit following a surprise invite to the gathering.
Mohammad Javad Zarif landed on Sunday in the French seaside town of Biarritz, where leaders of the G7 nations - the United States, Canada, France, Germany, the United Kingdom, Italy and Japan - were meeting to discuss a host of issues, including global trade, climate change and Iran's nuclear programme.
Zarif immediately went into a three-and-a-half-hour meeting with French foreign minister, Jean-Yves Le Drian, according to Reuters news agency. He spent half an hour with Macron.
"Iran's active diplomacy in pursuit of constructive engagement continues," Zarif said in a post on social media. "Road ahead is difficult. But worth trying."
His plane departed moments after the whirlwind meeting ended.
An official in Macron's office told AFP the discussions were "positive".
Macron, the host of this year's G7 summit, has been leading efforts to defuse tensions triggered by US President Donald Trump's decision to pull out of an internationally-brokered deal that offered Iran relief from global sanctions in exchange for curbs on its nuclear programme.
After the unilateral exit, Washington reimposed punishing sanctions on Iran, including on its oil and banking sectors.
Zarif did not meet Trump, who was also at the G7 meeting.
Macron decided to invite the Iranian foreign minister to Biarritz after hosting a dinner of G7 leaders on Saturday night, a French official told AFP. The invite had been made "in agreement with the United States", the official added, contradicting a claim by the White House that Trump had not been informed of Zarif's arrival.
Macron had also hosted Zarif for talks in Paris on the eve of the summit on Friday.
The French president is urging Trump to offer some sort of relief to Iran, according to Reuters and AFP, such as lifting sanctions on oil sales to China and India, or a new credit line to enable exports. While the nuclear deal's remaining signatories - France, Germany, UK, China and Russia - oppose the US move, they have struggled to protect Iran from the US sanctions.
A French diplomat told reporters last week that a "pause" in Trump's maximum pressure campaign against Tehran was necessary to get Iran back to the negotiating table.
Trump wants to force Iran into new talks that would include its ballistic missile programme and support for regional armed groups. But Iran has rejected that, saying Washington could not be trusted. And a year after the US exit, Tehran began scaling back some of its commitments under the nuclear accord.
In July, Washington imposed sanctions specifically on Zarif, blocking any property or interest he had in the US. Zarif said he had none.
US officials said the censure was meant to send a "clear message" to Iran as tensions further escalated over alleged aggressions in the Strait of Hormuz, a significant trade route in the Gulf.
Al Jazeera's Assed Baig, reporting from Tehran, said Zarif's visit to the G7 summit highlighted hunger from Iranian politicians - in particular, Iran's President Hassan Rouhani - to salvage the 2015 nuclear accord.
"[The negotiations are taking place] to save the reputations of those political leaders in Iran that backed this nuclear deal," he said from Tehran.
Zarif's unannounced visit played out against apparent divisions between Trump and Macron on how to deal with Iran.
Earlier on Sunday, Macron told LCI television that the G7 leaders had agreed on "what we wanted to say jointly on Iran".
Officials from the French presidency told news agencies the G7 leaders had discussed the issue over dinner on Saturday evening and agreed that Macron should hold talks and pass on messages to Iran.
Trump denied that shortly afterwards. Asked if he had signed off on a statement that Macron intends to give on behalf of the G7 on Iran, he said: "I haven't discussed this. No, I haven't."
He added: "We'll do our own outreach, but, you know, I can't stop people from talking. If they want to talk, they can talk."
Macron later played down his earlier remarks, saying there was no formal mandate from the G7 leaders.
"Yesterday, we had a discussion from which two priorities emerged. First of all, no member of the G7 wants Iran to ever get a nuclear weapon. Second, all members of the G7 are deeply committed to stability and peace in the region and therefore want to avoid actions that could compromise that," he said.
"The G7 is an informal group. There is no formal mandate given to anyone in this context. We will each continue to take initiatives to reach our two goals, that's what's important. The outcome of yesterday's discussions is that we will continue to all act, each in their own way."
Bessma Momani, professor of political science at the University of Waterloo in Canada, said France had vested interests in trying to defuse tensions between the US and Iran.
Several French companies, including car giants Peugeot and Citroen and oil firm Total, pulled out of multi-billion dollar deals with Iran following the US sanctions.
In addition to the economic interests, "Macron feels as if he is one of the sole champion of the liberal international order," Momani told Al Jazeera.
"I would even argue that perhaps Macron feels that he can sort of get some mileage out of the so-called 'bromance' he once had with Donald Trump ... But it won't be easy."
German Chancellor Angela Merkel welcomed the meeting between Zarif and Macron, saying it was worth taking every opportunity to avoid further escalation of the standoff over Iran's nuclear programme.
She said G7 leaders had "good, constructive discussion" on the subject on Saturday evening.