VIENNA — Iran will decide within weeks whether to stay in a faltering deal to restrain its nuclear program and is pressing Europe to compensate for President Trump’s decision to reimpose sanctions, a senior Iranian official said Friday.

The official warned that Tehran could also pull out from a separate treaty that limits the spread of nuclear weapons.

The caution came ahead of the first talks involving all the remaining parties to the landmark 2015 deal since the United States pulled out this month. 

An official report Thursday declared that Iran is still in compliance with the stringent controls on its nuclear program.

Iran has long declared that its program is limited to the peaceful generation of nuclear energy and production of medical isotopes. If it were to pull out of the 2015 Joint Comprehensive Plan of Action (JCPOA) and the 1970 Treaty on the Nonproliferation of Nuclear Weapons (NPT) and seek nuclear weapons, it could spark an arms race in the already volatile Middle East.

Here are key moments from Secretary of State Mike Pompeo's speech at the Heritage Foundation May 21, where he spoke about a potential new deal with Iran. (Reuters)

The United States and Israel have also warned that an Iranian nuclear weapons program would be countered with force.

“We have not decided yet to stay in the deal,” said the Iranian official, who briefed a small group of reporters under ground rules of anonymity. The official said that Iranian hard-line factions that have always opposed the nuclear deal are pushing for a broader reevaluation of Iran’s approach to nuclear issues.

One possibility if Iran withdraws from the deal would be a return to the status quo before 2015, the official said: an intensified uranium-enrichment program that the Iranian government says is for peaceful civilian use and economic relations with the world that are hobbled by U.S. sanctions.

The Post’s Alan Sipress and Karen DeYoung explain how President Trump’s decision might affect an already tense Middle East. (Sarah Parnass, Joyce Lee/The Washington Post)

The other possibility would be a more radical shift.

“Another solution that some promote is for Iran to go out of NPT or at least reconsider and revisit our nuclear doctrine,” the official said.

Tehran wants a full package of proposals from Europe by the end of May, after which leaders will decide whether to stay in the agreement, the official said. The aim is to see whether Europe can create enough paths to protect private investment in Iran so that Tehran still feels it is receiving concrete economic benefits from the deal.

“We were always told there is a Plan B,” the official said. “But I’m sorry to say we haven’t seen the Plan B yet.”

Europeans have been working on a suite of proposals, including making it easier for small and medium-sized enterprises to invest in Iran, sheltering payments for oil and gas from U.S. sanctions and ordering European businesses to disregard the new U.S. measures. But European diplomats involved in the efforts acknowledge uncertainty about whether that would be enough.

The lead Iranian nuclear negotiator, deputy foreign minister Abbas Araghchi, said after Friday’s talks that “the achievement was a united position by all participants” to try to save the deal. “I’m more confident now” than before the talks, he said.

But the U.S. pullout has shaken the pillars of support for the deal on all sides.

“We really shouldn’t underestimate the degree to which the nuclear deal is losing support inside Iran,” said Ellie Geranmayeh, a senior policy fellow at the European Council on Foreign Relations. “The deal was seen through an economic lens but also through a security lens, setting a modus vivendi between Tehran and Washington. And on both fronts, the deal has regressed.”

Secretary of State Mike Pompeo this week vowed to destroy Iran’s economy and “crush” its operatives and proxies around the world, offering a hard-line vision that many analysts said seemed intended to provoke Tehran.

The effort to salvage the deal has the United States’ allies working with its traditional adversaries to thwart White House actions. The negotiations in Vienna were called by Iran and included representatives from Britain, France, Germany, Russia, China and the European Union.

A parallel realignment may be underway on the Korean Peninsula, as South Korean President Moon Jae-in tries to salvage a summit between Trump and North Korean leader Kim Jong Un after Trump abruptly canceled it this week.

The Iranian official dismissed any further attempt to work with the United States, saying that the experience of making a deal with one administration only to have it nullified by its successor made new talks impossible.

The official also dismissed European attempts to link further talks on nuclear issues to Iran’s ballistic missile program and its role in the Middle East. Due to political pressures inside Iran, linking the issues was likely to further undermine the existing deal and make agreement on other issues harder, the official said.