IRAN's president on Tuesday warned it could restart its nuclear program “within hours or days” if the Trump administration continued its confrontational policies toward the Islamic Republic.

President Hassan Rouhani's remarks were a direct response to Trump's increasingly bellicose rhetoric toward Iran and his announcement of fresh sanctions on individuals and businesses connected to Iran's ballistic missile program.

Trump has also pledged to undo the 2015 agreement that Iran signed with the United States and five other world powers under which it suspended activities that could have led to the production of a nuclear bomb in exchange for a sharp reduction in international sanctions that had hammered its economy.

Rouhani told lawmakers in Iran that “sanctions and bullying” by Trump administration officials were the type of “failed policies that forced their predecessors to the negotiating table” to reach the landmark nuclear deal, one of the Obama administration's signature foreign policy achievements.

Rouhani said Iran could quickly resume its nuclear activities and increase its quantities of enriched uranium — a precursor to building a nuclear bomb — to levels higher than before the agreement.

“If they want to return to the previous position, definitely, not within a week or a month, but within hours or days, we will be back to a much more advanced stage than we were during our last negotiations,” the state IRNA news agency quoted Rouhani as saying.

Rouhani has staked his presidency on the nuclear deal, and won reelection this year in part because the agreement remains widely popular in Iran, even among anti-Western hard-liners who believe it averted a military confrontation with the U.S.

It was the first time Rouhani threatened to break the agreement, a sign of how rapidly the war of words between the U.S. and Iran has escalated since Trump took office.

It was not clear if Rouhani's comments were bluster or if Iran could indeed restart its nuclear activities quickly. United Nations inspectors have access to Iran's nuclear facilities under the agreement and have said the Islamic Republic is complying with its terms.

But last week, the head of Iran's atomic energy agency and an architect of the 2015 agreement, Ali Akbar Salehi, suggested that Iran could return to 20% uranium enrichment levels “in four or five days … to catch [the U.S.] by surprise.”

Congress has repeatedly certified that Iran is complying with the agreement — as it is required to do every 90 days — but Trump has called the deal “a disaster” and suggested that he would push to have the certification revoked.

Meanwhile, he has ratcheted up pressure on Iran by announcing a massive arms deal with rival Saudi Arabia and unilateral economic sanctions related to Iran’s ballistic missile program. The missile program is not covered by the nuclear agreement, but Iran believes any additional U.S. sanctions violate the spirit of the deal.

Iran responded this week by announcing increased spending on its military, including an additional $300 million for the elite Quds Force of the Islamic Revolutionary Guard Corps, a paramilitary organization led by hard-liners.

It also announced that the government would prepare a strategic plan to combat the United States' “hegemony-seeking policies” and “interference” in the Middle East.

“Iran is sure that the sanctions are a failure,” said Hamid Reza Taraghi, a political analyst close to the supreme leader. “What President Rouhani said today is a threat against America's threat.”

• Ramin Mostaghim has been the Los Angeles Times' Tehran-based special correspondent since early 2007. He has worked as a journalist, producer and translator for Iranian and Western media for three decades. Since joining the L.A. Times, he has covered Iran's capture and release of British sailors in 2007, the parliamentary elections of 2008, the disputed presidential election of 2009 and its violent aftermath. He graduated with a degree in zoology from Razi University in Kermanshah and maintains strong personal connections to Iran's Kurdish western provinces and northern Caspian Sea region.

• Shashank Bengali is the Los Angeles Times' South Asia correspondent, covering a stretch of countries from Iran to Myanmar. He joined the L.A. Times in 2012 as a national security reporter in the Washington bureau. He has reported from more than 50 countries since beginning his career with McClatchy Newspapers, where he served as a foreign correspondent in Africa and the Middle East. In 2016, he shared in the Pulitzer Prize awarded to the L.A. Times staff for coverage of the mass shooting in San Bernardino, California Originally from Cerritos, California, Shashank holds degrees in journalism and French from USC and a master's in public policy from Harvard. He lives with his wife in Mumbai, India.