The United States is withdrawing from the Iran nuclear deal and imposing the “highest level” economic sanctions against Iran, President Donald Trump announced Tuesday afternoon.

“The United States will withdraw from the Iran nuclear deal,” Trump said, calling the deal “defective at its core” and a “disastrous deal” that gave the Iranian “regime of great terror” billions of dollars.

“[…] America will not be held hostage to nuclear blackmail [and we] won’t allow American cities to be threatened with destruction,” he said, later saying that the withdrawal will help keep Americans safe.

“The Iranian regime is the leading state sponsor of terror. No action taken by the regime has been more dangerous than its pursuit of nuclear weapons and the means of delivering them,” the President said.

Trump said the United States will now work with its allies “to find a real, comprehensive, lasting solution to the Iranian nuclear threat.”

The U.S. faced a May 12 deadline to decide whether or not to remain in the Iran nuclear deal.

President Trump has long been critical of the Obama-era agreement, calling it an “embarrassment” and “one of the worst and most one-sided transactions the United States has ever entered into.”

There were reports earlier in the day that Trump had told French President Emmanuel Macron that he planned to withdraw from the Iran nuclear deal and reinstate sanctions against the country, as well as additional economic sanctions, according to a person who had been briefed on the conversation.

Macron and other European leaders tried to convince Trump to remain in the deal, saying it would be better to be in the deal than out of it.

Iran’s foreign minister had said last week that the nation will not renegotiate the 2015 Iran nuclear deal.

President Trump in April said Iran would pay a “price” if it threatens the U.S. “in any way” and restarts its nuclear program.

Earlier this month, Iranian President Hassan Rouhani said in a live broadcast that if President Trump follows through with his promise to pull out of the Iran nuclear deal, the United States “will surely regret it.”

“Iran will not violate the nuclear deal, but if the United States withdraws from the deal, they will surely regret it. Our response will be stronger than what they imagine and they would see that within a week,” he had said.

Iran has promised to ramp up its nuclear program if the deal collapses, though many feel as though the deal has done little to diminish Iran’s nuclear efforts anyway. Iran insists its efforts have been for research and technology, and that its missiles are purely defensive.

“We will produce any weapons necessary to defend our country in such a volatile region. But we will not use our weapons against our neighbors,” Rouhani has said.

That was not the first time Iran has suggested that pulling out of the deal would be a grave mistake for the U.S.

In early March, Iranian Foreign Minister Mohammad Javad Zarif forewarned on state television: “If the United States makes the mistake of pulling out of the JCPOA (Joint Comprehensive Plan of Action), it will definitely be a painful mistake for the Americans.”

Trump’s threats regarding the nuclear deal have influenced Iran to consider all possible outcomes, including a JCPOA without the U.S., but which might still include some European allies, China and Russia. However, some analysts have suggested that the nuclear agreement would likely collapse altogether if the U.S. decided to pull out.

More recently, the President has leaned on European partners to “fix the terrible flaws” in the deal as a last resort. France, Britain and Germany outlined possible new sanctions for Iran as a way to not only keep Trump committed to the deal, but also persuade their EU partners to save the accord.