Iranian President Hassan Rouhani has a message for President Donald Trump: Tehran will remain in the Iran nuclear deal — for now.

But he added a dire warning: If Iran and other countries in the agreement can’t agree on a way forward, Iran might start enriching uranium at uncapped levels.

Rouhani asked his top diplomat to work with countries that signed on to the Iran deal — including France, Germany, Russia, and China — to figure out how to proceed without the United States. But he put a time limit on those talks, which means Iran may put itself on the path toward a nuclear weapon in mere weeks.

“I have directed the Atomic Energy Agency to prepare for the next steps, if necessary, to begin our own industrial enrichment without restriction,” Rouhani said in a statement on Tuesday, just minutes after Trump withdrew the US from the Iran nuclear deal. “We will wait several weeks before acting on this decision. We will be consulting with friends, our allies and members who have signed on to the agreement. Everything depends on our national interests. If our nation’s interests are attained in the end, we will continue the process.”

That’s bad news for Trump, who promised he would never allow Iran to obtain a nuclear weapon. The Iran deal capped Tehran’s uranium enrichment at around 4 percent. Now, it seems, Iran will go much higher, but it’s unclear if it will enrich uranium at the 90 percent level required for a nuclear weapon.

Still, it seems like Trump’s gambit to deter Iran from getting a nuke may be failing just minutes after he decided to scrap the Iran deal.

LIVE | Following US withdrawal from the nuclear deal, Rouhani says Iran will restart enrichment at an "industrial level". However, negotiations with the remaining parties to the agreement will continue. Watch more: https://t.co/GJtlLYmeCi pic.twitter.com/wfAH51ujo0 — euronews (@euronews) May 8, 2018

How other world leaders reacted to Trump’s decision

Trump has received mixed reactions to his Iran deal announcement.

Let’s start with the negative. Former President Barack Obama, who spearheaded the Iran deal, called Trump’s decision “misguided” in a Tuesday Facebook post, adding that “Walking away from the JCPOA [the formal acronym for the Iran deal] turns our back on America’s closest allies.”

It makes sense that Obama would slam Trump’s withdrawal. After all, the Iran deal was one of Obama’s signature foreign policy accomplishments.

But America’s allies are also upset with Trump, according to French President Emmanuel Macron.

France, Germany, and the UK regret the U.S. decision to leave the JCPOA. The nuclear non-proliferation regime is at stake. — Emmanuel Macron (@EmmanuelMacron) May 8, 2018

Trump does have leaders in his corner, though. No one seemed happier than Israeli Prime Minister Benjamin Netanyahu, who called Trump’s decision “bold” in a Tuesday tweet and “brave and correct” in a speech he gave after the US president’s announcement.

Just a week earlier, Netanyahu had lobbied Trump to leave the deal with a presentation that concluded Iran lied about its desire to build a nuke. Iran officially denies that claim.

Thank you President Trump for your bold decision and your commitment to prevent Iran from ever getting nuclear weapons. @realDonaldTrump pic.twitter.com/F8lldwqhID — Benjamin Netanyahu (@netanyahu) May 8, 2018

The question now is if Iran will actually follow through on its enrichment threat in the long term. If it does, Trump may hear much more from world leaders about how to handle Iran.