Iranian President Hassan Rouhani on Monday warned that the United States will pay a "high cost" if President Donald Trump scraps the Iran nuclear deal.

"Exiting such an agreement would carry a high cost for the United States of America, and I do not believe Americans would be willing to pay such a high cost for something that will be useless for them," Rouhani told CNN.

He added that such an action by the Trump administration "will yield no results for the United States but at the same time it will generally decrease and cut away and chip away at international trust placed in the Unites States of America."

Trump has long been a vocal critic of the Iran nuclear deal, which was signed during the term of the Obama administration, describing it as “the worst deal I’ve ever seen negotiated”.

Last week he again criticized the deal and said Iran was violating its spirit.

"The Iran deal is one of the worst deals I've ever seen, certainly at a minimum the spirit of the deal is atrociously kept," Trump said, adding, "The Iran deal is not a fair deal to this country. It's a deal that should not have ever been made.”

The U.S. last week extended sanctions relief for Iran as part of the 2015 nuclear agreement, even as it slapped new measures against Iranian targets accused of cyber attacks or fomenting militancy.

On October 15, Trump is due to decide whether Iran has breached the 2015 nuclear agreement. He recently confirmed that Iran is adhering to the nuclear agreement, but he and other officials in the administration stressed that the President still has reservations about the deal.

If Trump says Iran has breached the deal, Congress would have 60 days to decide whether to reimpose sanctions waived under the deal.

Rouhani told CNN Iran was ready to respond to the possibility of Trump walking away from the agreement.

"Given that Mr. Trump's actions and reactions and policies are somewhat unpredictable, we have thought long and hard about our reactions," he said, adding that any reaction from Iran would come "quite swiftly" and "probably within a week."

"If the U.S. wants to increase the tensions it will see the reaction from Iran," he threatened.

The Iranian President further warned of the diplomatic precedent that would be set by pulling out of the Iran agreement, especially with regard to North Korea.

"I think what the Iranian experience shows is a good experience that can be replicated elsewhere and executed elsewhere," he said.

"But keep in mind please that if the United States wishes to withdraw from the JCPOA, why would the North Koreans waste their time in order to sit around the table of dialogue with the United States, because they would think perhaps after years of talks and a potential agreement the next U.S. administration could step over or pull out of the agreement," added Rouhani.