WASHINGTON (Reuters) - President Donald Trump gave the Iran nuclear deal a final reprieve on Friday but warned European allies and Congress they had to work with him to fix “the disastrous flaws” in the pact or face a U.S. exit.

Trump said he would waive sanctions against Iran that were lifted as part of the international deal for the last time unless his conditions were met.

The ultimatum puts pressure on Europeans - key backers and parties to the 2015 international agreement to curb Iran’s nuclear program – to satisfy Trump, who wants the pact strengthened with a separate agreement within 120 days.

“Despite my strong inclination, I have not yet withdrawn the United States from the Iran nuclear deal,” Trump said in a statement. “Instead, I have outlined two possible paths forward: either fix the deal’s disastrous flaws, or the United States will withdraw.”

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

Trump, who has sharply criticized the deal reached during Democrat Barack Obama’s presidency, 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,” Trump said, pushing for a separate agreement. “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.”

The EU said in a statement it had taken note of Trump’s decision and would assess its implications.

Underscoring the difficulty now facing Europeans, a European diplomat, speaking under condition of anonymity, said: “It’s going to be complicated to save the deal after this.”

While Trump approved the sanctions waiver, the Treasury Department announced new, targeted sanctions against 14 entities and people, including the head of Iran’s judiciary, Sadeq Amoli Larijani, a close ally of Iran’s Supreme Leader Ayatollah Ali Khamenei.

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 senior administration official said Trump would be open to remaining in a modified deal if it were 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,” Trump said in the statement.

Republican Senator Bob Corker said “significant progress” had been made on bipartisan congressional legislation to “address the flaws in the agreement without violating U.S. commitments.”

SEVERAL CONDITIONS

Trump laid out several conditions to keep the United States in the deal. Iran must allow “immediate inspections at all sites requested by international inspectors,” he said, and “sunset” provisions imposing limits on Iran’s nuclear program must not expire. Trump said U.S. law must tie long-range missile and nuclear weapons programs together, making any missile testing by Iran subject to “severe sanctions.”

The president wants Congress to modify a law that reviews U.S. participation in the nuclear deal to include “trigger points” that, if violated, would lead to the United States reimposing its sanctions, the official said.

FILE PHOTO: Iran's national flags are seen on a square in Tehran February 10, 2012, a day before the anniversary of the Islamic Revolution. REUTERS/Morteza Nikoubazl/File Photo

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.

Analyst Richard Nephew said whether Trump’s conditions could be met depended on whether he wants a face-saving way to live with the nuclear deal with the political cover of tough-sounding U.S. legislation, or whether he really wants the deal rewritten.

Nephew, a former White House and State Department Iran sanctions expert, said legislation could be drafted that might appear to assuage Trump’s concerns, but that getting Iran to agree to allow unfettered international inspections or to no time limits on the nuclear deal’s restrictions was impossible.

Trump has argued behind the scenes that the nuclear deal makes the United States look weak, a senior U.S. official said.

A decision to withhold a waiver would have effectively ended the deal between Iran, the United States, China, France, Russia, Britain, Germany and the European Union. The other parties to the agreement would have been unlikely to join the United States in reimposing sanctions.

Hailed by Obama as key to stopping Iran from building a nuclear bomb, the deal lifted economic sanctions in exchange for Tehran limiting its nuclear program but Trump has argued that Obama negotiated a bad deal.

PRESSURE FROM EUROPE

Britain, France and Germany called on Trump on Thursday to uphold the pact.

Iran says its nuclear program is only for peaceful purposes and that it will stick to the accord as long as the other signatories respect it, but will “shred” the deal if Washington pulls out.

Two EU diplomats said EU foreign ministers will discuss what to do now at their next regular meeting, scheduled for Jan. 22 in Brussels.

The U.S. Congress requires the president to decide periodically whether to certify Iran’s compliance with the deal and issue a waiver to allow U.S sanctions to remain suspended.

Trump in October chose not to certify compliance and warned he might ultimately terminate the accord. He accused Iran of “not living up to the spirit” of the agreement even though the International Atomic Energy Agency says Tehran is complying.

Hard-liners on Iran in the U.S. Congress have called for the reimposition of the suspended sanctions and an end to the nuclear deal, while some liberal Democrats want to pass legislation that would make it harder for Trump to pull Washington out without congressional consent.

Trump and his top advisers have been negotiating with U.S. lawmakers on Capitol Hill to try to change sanctions legislation so that Trump does not face a deadline on whether to recertify Iranian compliance with the nuclear deal every 90 days.