by David E. Sanger

WASHINGTON — No sooner had President Donald Trump declared he was exiting the 2015 nuclear deal with Iran than Hassan Rouhani, the country’s president, reassured the world that he remained committed to making the accord work — even if Trump did not.

But he also left a vaguely worded, dangling threat: If Iran’s foreign minister, Mohammad Javad Zarif, failed to keep the deal going with Europe, Russia and China, the clerical government in Tehran might conclude that America’s departure from the agreement freed it to speed up its centrifuges and begin enriching uranium at levels well above what was agreed upon in the summer of 2015.

Rouhani said he would not bend to “psychological warfare” from Trump and that Iran’s Atomic Energy Organisation was ready to produce more nuclear fuel if necessary.

All of which raised the question: If Iran tried to ramp up production, how long would it take to get enough fuel to build a bomb?

The answer is at least a year, maybe significantly longer, assuming Iran decided to make its own fuel, rather than buy it from another nuclear power.

But if the nation starts down that road — and reassembles the thousands of centrifuges that spin at supersonic speeds to enrich uranium — the warning time to a bomb could be about three months. That is the same time frame that existed before President Barack Obama struck the nuclear deal.

David Albright, the president of the Institute for Science and International Security, a private group in Washington that tracks nuclear arms, said it would currently take Iran eight to 10 months to rebuild its enrichment complex and acquire sufficient uranium fuel to make a bomb.

“It’s something less than 12 months,” he said in an interview. That, however, is only the first step because the fuel would have to be turned into a weapon.

Iran has studied that process for years, a point Prime Minister Benjamin Netanyahu of Israel made last week when he revealed a stolen trove of old Iranian documents. The documents suggest significant conceptual progress in warhead design, but it is unclear whether the Iranians know how to produce the bombs or whether its missiles have the capability to deliver them.

Albright added that he expected Tehran to show restraint, at least in the near term, and keep its nuclear complex in line with the accord’s rules. “I’m assessing they won’t do anything” that would violate the curbs, he said.

Just building up a new stockpile of uranium would take a while. When the deal was struck in July 2015, Iran had roughly 22,000 pounds of low-enriched uranium on hand, the kind used for powering nuclear reactors. But it had to ship almost all of it out of the country.

The last time inspectors issued a detailed report, they indicated that Iran had less than 250 pounds in its stockpile — not enough to make a single nuclear weapon, even with considerable enrichment to bomb-grade levels.

That is why it would probably take Iran a long while to resume production: It does not have the uranium needed to keep a larger number of centrifuges running.

Building that stockpile would be difficult. And the Iranians have already made clear they have little interest in bringing back their old, inefficient centrifuges. They were working on far more powerful models before the deal was struck, but could not begin to experiment with them, under the rules of the agreement, for another seven years or so.

Now, if Tehran declares that Trump has abrogated the deal and that its restrictions are effectively lifted, it could well decide to accelerate that work.