Media playback is unsupported on your device Media caption Five times Macron ripped up Trump agenda

French President Emmanuel Macron has said he may have failed in efforts to persuade Donald Trump to stick to an international nuclear deal with Iran.

"My view is... that he will get rid of this deal on his own, for domestic reasons," Mr Macron said at the end of a three-day state visit to the US.

Mr Trump has until 12 May to decide on the deal, which aimed to prevent Iran acquiring nuclear weapons.

He has been a strong critic of the accord, calling it "insane".

On Wednesday, Mr Macron used similar language to describe frequent shifts in the US position on global issues, including climate change and the Iran agreement.

"It can work in the short term, but it's very insane in the medium to long term," he is quoted as telling reporters following a question-and-answer session with students at George Washington University.

Mr Macron made changing the US president's mind on Iran a top priority for his visit but ended up admitting there was a "big risk" Mr Trump would abandon the deal.

Media playback is unsupported on your device Media caption A timeline of what Trump's said about the Iran deal

He agreed with Mr Trump that any deal should include a wider agreement on Iran's influence in the Middle East and should cover the country's nuclear activities longer term, as well as its ballistic missile programme.

He said he would work with Mr Trump to build a "new framework" in the Middle East - and especially in Syria.

His comments came at the end of a state visit in which the two leaders discussed differences on global trade and the environment, including the possibility of the US rejoining the Paris climate accord.

Earlier on Wednesday, Mr Macron used a speech to the joint houses of the US Congress to denounce nationalism and isolationism, in what was seen as a thinly veiled attack on Mr Trump's America First agenda.

What does the current Iran deal involve?

Under the terms of the agreement, reached under Mr Trump's predecessor Barack Obama, Iran agreed to limit its controversial nuclear programme in return for an easing of economic sanctions.

The deal was struck between Iran and six world powers - the US, UK, France, Germany, China and Russia.

Under the deal, Iran's ability to enrich uranium is severely restricted - the number of centrifuges it can install has been limited and its uranium stockpile is being drastically reduced. The restrictions are set to expire in 2025.

Iran also agreed to redesign the nuclear reactor at Arak so that it could not produce weapons-grade plutonium, and to allow inspectors from the International Atomic Energy Agency into any site in the country they regarded as suspicious.

If any aspect of the deal is violated, the UN sanctions will resume for 10 years.

Why does Trump dislike it?

Warning of "big problems" if Iran resumed its nuclear programme, Mr Trump on Tuesday said a "bigger" deal was possible but it must be built on "solid" foundations.

"They should have made a deal that covered Yemen, that covered Syria, that covered other parts of the Middle East," he said.

The US president has long complained that the accord - signed by the US, Iran, Russia, China, France, the UK and Germany - does nothing to halt Iran's support for militant groups in the region such as the Lebanese Shia Muslim group Hezbollah.

Mr Trump is also demanding that signatories to the pact agree permanent restrictions on uranium enrichment.

In January, he signed a waiver suspending US sanctions on Iran for 120 days, saying this was the last time he would extend the sanctions relief. The next waiver is due to be signed on 12 May.

Echoing Mr Trump's concern over Iran's influence in the region, Gen Joseph Votel, head of the US military's Central Command, described the country as the biggest long-term threat to security in the Middle East.

"[Iran's] very aggressive approach to the region in trying to spread their revolutionary rhetoric and regime focus here is I think very, very evident", he told the BBC.

How does Iran see it?

A senior aide to Iranian Supreme Leader Ayatollah Ali Khamenei said Tehran would not accept any change to the nuclear deal.

Image copyright Reuters Image caption Ayatollah Khamenei said Tehran would never agree to restricting its influence in the Middle East

"If Trump exits the deal, Iran will surely pull out of it... Iran will not accept a nuclear deal with no benefits for us," said Ali Akbar Velayati.

He also ruled out Iran restricting its influence in the Middle East.

"This is our region," he said. "We are in our own region and it is legitimate."

Iranian President Hassan Rouhani has said the US and French leaders have no "right" to renegotiate a seven-party agreement.

Iran would take "important steps regarding our nuclear technology", he said on Wednesday, but added that the measures would be "peaceful".