The Iran nuclear deal was written with several “sunset” provisions setting expiration dates, some of them 15 years into the future, when restrictions on the Islamic Republic’s nuclear program would lift.

Then Donald Trump was elected president, and a sunset on the deal itself became possible. During the campaign, Trump regularly denigrated the Iran agreement. He vowed, at turns, to walk away from the 2015 accord, or renegotiate it, or enforce it so rigorously that it might collapse on its own.

Trump is expected to take a more confrontational approach with Iran, showing no tolerance for even small breaches of what was agreed upon. The strategy seems designed to increase pressure on Iran, stopping what critics consider backsliding or cheating, but also to compel it to moderate its actions elsewhere in the region.

[Key moments in the long history of U.S.-Iran tensions]

“I was skeptical that the deal would survive, even if Clinton were elected, but the chances of it reaching its expiration date under Trump are very slim,” said Karim Sadjadpour, an Iran analyst with the Carnegie Endowment.

“I could see a scenario where Iran continues to do provocative things. Both Trump and Congress respond with new sanctions. And Iran says, ‘You just abrogated your end of the deal, therefore we’re going to put our foot on the gas again and reconstitute our nuclear program.’ But the likelihood that either side gratuitously walks away from the deal is very low. Neither side wants to be blamed for ripping it up.”

Trump will take office a year and a half after the agreement was reached in Vienna, limiting Iran’s ability to amass enough material to build nuclear weapons without the world receiving advance warning. Although some aspects will remain in force for 10 or 15 years, Secretary of State John F. Kerry said Iran would be required to grant inspectors from the International Atomic Energy Agency access to its nuclear facilities “forever.”

[Assessing the Iran nuclear deal one year later]

In exchange, Iran got relief from nuclear-related sanctions and received about $100 billion in previously frozen money. U.S. sanctions related to missile testing, human rights abuses and the support of terrorist groups such as Hezbollah remain in place.

The Obama administration, eager to preserve the viability of one of its legacy achievements, worked hard to ensure that the deal did not falter. When Iran complained that it was not reaping enough economic benefits, Kerry reached out to wary bankers and foreign companies to outline what is permissible. And when Iran surpassed the agreed-upon limits for heavy water used in some nuclear reactors, the U.S. government bought the excess for commercial resale.

Some clerics and officials in Tehran have also been anticipating the deal’s collapse. Ayatollah Ali Khamenei, Iran’s supreme leader, has said the agreement “once again proved the pointlessness of negotiating with the Americans.” Others, however, have an interest in its success, including President Hassan Rouhani, who promoted the negotiations.

Ditching the deal would be highly unpopular with the countries that negotiated it alongside the United States — Britain, China, France, Germany and Russia. Since the accord was reached, Britain has reopened its embassy in Tehran. Many European companies have made tentative trips to Tehran to explore business opportunities. And Russia, which is allied with Iran in the Syrian conflict, would also oppose any effort to abandon it, which, in addition, could complicate Trump’s desire to improve relations with Moscow.

“Most of the world doesn’t want to cut off ties with Iran,” said Alireza Nader, an Iran analyst with the Rand Corp. “That really constrains the United States using its economic leverage. Unless Iran does something that disappoints the international community, like electing a hard-liner as the next president.”

A more likely policy, analysts say, would be to seize on any Iranian violations of the nuclear deal, even relatively minor ones that the Obama administration worked with the Iranians to correct.

“There’s a recognition in the incoming team that the regime cheats incrementally, not egregiously, even though the sum total of cheating turns out to be egregious,” said Mark Dubowitz, executive director of the Foundation for Defense of Democracies and a prominent critic of the agreement. “Trump should show a zero-tolerance policy to cheating. Which means, at a minimum, using U.S. sanctions to respond. At a maximum, it means building up a case there’s a history of incremental violations, and move to snap back sanctions.”

Underscoring how quickly tensions can ratchet up, Tehran last month announced it would start developing nuclear-powered ships and submarines after Congress voted to renew the authorization of sanctions against Iran — a measure designed to ensure that the sanctions that were lifted can be reimposed quickly.

“What I’d like to see is them going along with the deal, but subtly antagonizing the Iranians enough so the Iranians want to scrap it,” said Michael Rubin, an analyst at the Heritage Foundation. “More non-nuclear sanctions. Pushing the IAEA to inspect more. We can force them to be the ones to pull the trigger.”

That kind of analysis is being closely read in Tehran.

“The deal is in tremendous danger,” said Trita Parsi, head of the National Iranian American Council, who has been a strong supporter of the agreement. “Iranians are building up their case to make sure that once the deal falls apart, they can point to a strong record of the U.S. causing it. It’s going to be part of the cost the administration will have to decide if it’s willing to pay.”

Read more:

Do campaign statements and tweets add up to a Trump foreign policy strategy?

Trump’s generals, hardened by war, see militant Islam, Iran as dire dangers