Iranian President Hassan Rouhani warned U.S. officials on Monday that there will be a "high cost" to pay if President Trump fulfills his promise to undo the landmark nuclear deal reached in 2015.

"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 at the U.N. General Assembly in New York.

The Iranian president said pulling out of the Obama-era agreement would "yield no results for the United States" and simultaneously "decrease and chip away at international trust placed in the United States of America."

Rouhani's comments came hours after Trump met with Israeli Prime Minister Netanyahu in New York, during which they were expected to discuss the Iran nuclear deal. Trump must decide next month whether to recertify to Congress that Iran is complying with the terms of the agreement.

"They have violated so many different elements, but they've also violated the spirit of that deal," Trump told reporters last week.

"You will see what we'll be doing in October," he added. "It will be very evident."

Iranian officials and the International Atomic Energy Agency have both maintained that Iran has remained in compliance with the deal, including by honoring an agreement to inspections of Iranian military facilities.

Rouhani said Iran has been preparing its response in anticipation that Trump will cancel the deal.

"Given that Mr. Trump's actions and reactions and policies are somewhat unpredictable, we have thought long and hard about our reactions," he said.

Both Trump and Rouhani are attending the UN General Assemy in New York this week, and Trump is expected to discuss the nuclear agreement during his high-profile speech Tuesday at the gathering of foreign leaders.