US President Donald Trump gave the Iran nuclear deal a final reprieve but warned European allies and Congress they had to work with him to fix the terrible flaws of the pact or face US withdrawal.

Mr Trump said he would waive nuclear sanctions against Iran but only as a last chance and would not do so again. The ultimatum puts pressure on Europeans - key backers and parties to the 2015 international agreement to satisfy Mr Trump, who has called the deal "the worst ever".

A senior US administration official said Mr Trump wants the deal strengthened with a follow-on agreement in 120 days or the United States will unilaterally withdraw from the international pact.

Iranian Foreign Minister Mohammad Javad Zarif responded on Twitter that the deal was not renegotiable and that Mr Trump's stance "amounts to desperate attempts to undermine a solid multilateral agreement".

Mr Trump, who has criticised the deal sharply both as a presidential candidate and since taking office, had privately chafed at having to once again waive sanctions on a country he sees as a rising threat in the Middle East.

"This is a last chance," Mr Trump said in a statement.

Donald Trump

"In the absence of such an agreement, the United States will not again waive sanctions in order to stay in the Iran nuclear deal. And if at any time I judge that such an agreement is not within reach, I will withdraw from the deal immediately," said Mr Trump.

While Mr Trump approved the sanctions waiver, the US Treasury Department announced new, targeted sanctions against 14 Iranian entities and people.

Mr Trump had lengthy discussions yesterday with Secretary of State Rex Tillerson, national security adviser HR McMaster and others about the deal, which was reached during the presidency of Democrat Barack Obama.

Mr Trump now will work with European partners on a follow-on agreement that enshrines certain triggers that the Iranian regime cannot exceed related to ballistic missiles, said senior administration officials who briefed reporters on the decision.

One official said Mr Trump would be open to remaining in a modified deal if it was made permanent.

"I hereby call on key European countries to join with the United States in fixing significant flaws in the deal, countering Iranian aggression, and supporting the Iranian people," Mr Trump said in the statement.

"If other nations fail to act during this time, I will terminate our deal with Iran."

Mr Trump laid out several conditions for a fix to the deal that would keep the United States in. Iran must allow "immediate inspections at all sites requested by international inspectors," he said, and that provisions preventing Iran from possessing a nuclear weapon must not expire.

Mr Trump said US law must tie long-range missile and nuclear weapons programmes together, making any missile testing by Iran subject to "severe sanctions".

Mr Trump wants the US Congress to modify a law that reviews US participation in the nuclear deal to include "trigger points" that if violated would lead to the United States reimposing its sanctions, the official said.

This would not entail negotiations with Iran, the official said, but rather would be the result of talks between the United States and its European allies. Work already has begun on this front, the official said.

Mr Trump has argued behind the scenes that the nuclear deal makes the United States look weak, a senior US official said. The argument for staying in, the official said, was to allow time to toughen the terms of the agreements.