IRAN says it has plans to respond to any move by US President Donald Trump on the 2015 nuclear agreement and the US would regret a decision to exit the accord, as France’s president warned such a move could lead to war.

Mr Trump has said that unless European allies rectify “flaws” in Tehran’s deal with world powers by May 12, he will refuse to extend US sanctions relief for Iran. “We have plans to resist any decision by Trump on the nuclear accord,” Iran’s President Hassan Rouhani said in a speech carried live by state television.

“Orders have been issued to our atomic energy organisation ... and to the economic sector to confront America’s plots against our country,” Rouhani told a rally in northeast Iran overnight.

“America is making a mistake if it leaves the nuclear accord,” Mr Rouhani said.

In a magazine interview, French President Emmanuel Macron warned a decision by Mr Trump to withdraw could lead to war.

“We would open the Pandora’s box. There could be war,” Mr Macron told German weekly magazine Der Spiegel, adding “I don’t think that Donald Trump wants war.”

Mr Macron urged Mr Trump not to withdraw when he met him in Washington late last month. Britain, France and Germany remain committed to the nuclear accord but, in an effort to keep Washington in it, want to open talks on Iran’s ballistic missile program, its nuclear activities beyond 2025 — when key provisions of the deal expire — and its wars in Syria and Yemen.

“We will not negotiate with anyone about our weapons and defences, and we will make and store as many weapons, facilities and missiles as we need,” Mr Rouhani said, reiterating a rejection by Iranian leaders of talks on Iran’s missile program which Tehran says is defensive.

“You (US) should know that you cannot threaten this great nation because our people withstood eight years of ... defence (in the war with Iraq),” Mr Rouhani said in another speech during his visit to Razavi Khorasan province. “We want to preserve our peaceful nuclear technology for electricity, medicine, agriculture and health ... and we do not seek to threaten the world or the region,” he said.

Meanwhile Israeli Prime Minister Benjamin Netanyahu overnight stepped up his calls to end the Iranian nuclear deal.

In a briefing to foreign reporters, The Associated Press reports, Mr Netanyahu said “a deal that enables Iran to keep and hide all its nuclear weapons know-how, is a horrible deal”.

It comes as Britain’s ambassador to the US said overnight the UK believes it’s still possible to address Mr Trump’s concerns about the Iran nuclear deal in time to prevent him from pulling out of the agreement.

Kim Darroch said Britain has ideas for dealing with those concerns. They include Iran’s ballistic missile program and its involvement in Mideast conflicts, issues that aren’t part of the international agreement. Trump also objects to the accord’s sunset clause, which allows Iran to resume part of its nuclear program after 2025.

“We think that we can find some language, produce some action that meets the president’s concerns,” Darroch told Face the Nation in the US. The deadline for Mr Trump’s decision is this coming Saturday.

Britain’s foreign secretary, Boris Johnson, has scheduled talks with US officials in Washington this week. His trip follows visits in recent weeks by the leaders of France and Germany, who also tried to convince Mr Trump to stick with the agreement. All three European countries signed the 2015 deal, along with Russia and China.