President Donald Trump plans to follow through on his campaign threat to pull out of the landmark nuclear accord with Iran, according to two people familiar with his thinking, dealing a profound blow to U.S. allies and potentially deepening the president’s isolation on the world stage.

Trump’s decision means Iran’s government must now decide whether to follow the U.S. and withdraw or try to salvage what’s left of the deal. Iran has offered conflicting statements about what it may do — and the answer may depend on exactly how Trump exits the agreement.

The 2015 pact itself does not contain any provisions for leaving, but Trump was expected to re-impose most, if not all, of the sanctions on Iran that were eased under the deal. That would erase the economic benefits promised to Iran under the deal and be tantamount to the United States walking away.

It wasn’t immediately clear which sanctions would be slapped back on Iran and how quickly. But grace periods of a few months to half a year are expected to be granted so that businesses and governments can wind down operations that would violate re-imposed U.S. sanctions, the individuals said.

A slower withdrawal process could allow more room for Trump to reverse course later and decide to stay — if he secures the additional restrictions on Iran that European nations tried unsuccessfully to negotiate to prevent him from withdrawing. Indeed, as administration officials briefed congressional leaders about Trump’s plans Tuesday, they emphasized that just as with a major Asia trade deal and the Paris climate pact that Trump has abandoned, he remains open to renegotiating a better deal, one person briefed on the talks said.

The agreement, struck in 2015 by the United States, other world powers and Iran, lifted most U.S. and international sanctions against the country. In return, Iran agreed to restrictions on its nuclear program making it impossible to produce a bomb, along with rigorous inspections.

In a burst of last-minute diplomacy, punctuated by a visit by Britain’s top diplomat, the deal’s European members gave in to many of Trump’s demands, according to officials, diplomats and others briefed on the negotiations. Yet they still left convinced he was likely to re-impose sanctions.

Macron was to have a conference call with British Prime Minister Theresa May and German Chancellor Angela Merkel about half an hour before Trump’s announcement.

Trump spoke with French President Emmanuel Macron and Chinese leader Xi Jinping about his decision Tuesday. Macron vigorously supports the deal and tried to persuade Trump to stay committed to it during a visit to Washington last month.

The British Foreign Secretary traveled to Washington this week to make a last-minute pitch to the U.S. to remain in the deal, according to a senior British diplomat. The diplomat, who spoke on condition of anonymity, said the British objective will remain to uphold and maintain the deal.

Hours before the announcement, European countries met to underline their support for the agreement. Senior officials from Britain, France and Germany met in Brussels with Iran’s Deputy Foreign Minister for Political Affairs, Abbas Araghchi.

If the deal collapses, Iran would be free to resume prohibited enrichment activities, while businesses and banks doing business with Iran would have to scramble to extricate themselves or run afoul of the U.S. American officials were dusting off plans for how to sell a pullout to the public and explain its complex financial ramifications, said U.S. officials and others, who weren’t authorized to speak ahead of an announcement and requested anonymity.

Building up anticipation, Trump announced on Twitter he would disclose his decision at 2 p.m. at the White House.

In Iran, many were deeply concerned about how Trump’s decision could affect the already struggling economy. In Tehran, President Hassan Rouhani sought to calm nerves, smiling as he appeared at a petroleum expo. He didn’t name Trump directly, but emphasized that Iran continued to seek “engagement with the world.”

“It is possible that we will face some problems for two or three months, but we will pass through this,” Rouhani said.

Under the most likely scenario, Trump would allow sanctions on Iran’s central bank — intended to target oil exports — to kick back in, rather than waiving them once again on Saturday, the next deadline for renewal, said individuals briefed on Trump’s deliberations. Then the administration would give those who are doing business with Iran a six-month period to wind down business and avoid breaching those sanctions.

Depending on how Trump sells it — either as an irreversible U.S. pullout, or one final chance to save it — the deal could be strengthened during those six months in a last-ditch effort to persuade Trump to change his mind. The first 15 months of Trump’s presidency have been filled with many such “last chances” for the Iran deal in which he’s punted the decision for another few months, and then another.

Other U.S. sanctions don’t require a decision until later, including those on specific Iranian businesses, sectors and individuals that will snap back into place in July unless Trump signs another waiver. A move on Tuesday to restore those penalties ahead of the deadline would be the most aggressive move Trump could take to close the door to staying in the deal.

Even Trump’s secretary of state and the U.N. agency that monitors nuclear compliance agree that Iran, so far, has lived up to its side of the deal. But the deal’s critics, such as Israel, the Gulf Arab states and many Republicans, say it’s a giveaway to Tehran that ultimately paves the path to a nuclear-armed Iran several years in the future.

Iran, for its part, has been coy in predicting its response to a Trump withdrawal. For weeks, Iran’s foreign minister had been saying that a re-imposition of U.S. sanctions would render the deal null and void, leaving Tehran little choice but to abandon it as well. But on Monday, Rouhani said Iran could stick with it if the European Union, whose economies do far more business with Iran than the U.S., offers guarantees that Iran would keep benefiting.

For the Europeans, a Trump withdrawal would also constitute dispiriting proof that trying to appease him is futile.

The three EU members of the deal — Britain, France and Germany — were insistent from the start that it could not be re-opened. But they agreed to discuss an “add-on” agreement that wouldn’t change the underlying nuclear deal, but would add new restrictions on Iran to address what Trump had identified as its shortcomings. Trump wanted to deter Iran’s ballistic missile program and other destabilizing actions in the region. He also wanted more rigorous nuclear inspections and an extension of restrictions on Iranian enrichment and reprocessing rather than letting them phase out after about a decade.

Negotiating an add-on agreement, rather than revising the existing deal, had the added benefit of not requiring the formal consent of Iran or the other remaining members: Russia and China. The idea was that even if they balked at the West’s impositions, Iran would be likely to comply anyway so as to keep enjoying lucrative sanctions relief.

Although the U.S. and Europeans made progress on ballistic missiles and inspections, there were disagreements over extending the life of the deal and how to trigger additional penalties if Iran were found violating the new restrictions, U.S. officials and European diplomats have said. The Europeans agreed to yet more concessions in the final days of negotiating ahead of Trump’s decision, the officials added.

___

Associated Press writers Matthew Lee, Jill Colvin, Zeke Miller and Ken Thomas in Washington and Amir Vahdat and Nasser Karimi in Tehran, Iran, contributed to this report.