WASHINGTON — President Donald Trump said Monday that he is willing to sit down with Iranian President Hassan Rouhani with "no preconditions" after Rouhani declared that a U.S. war with his country would be "the mother of all wars."

Tensions between Tehran and Washington have been escalating since May, when Trump unilaterally reneged on the U.S. commitments under the international Joint Comprehensive Plan of Action that required Iran to halt its nuclear weapons program.

Last week, Rouhani said that Trump's confrontational stance toward Iran was tempting fate.

"Peace with Iran would be the mother of all peace; war with Iran would be the mother of all wars," the Iranian president said.

Trump responded then with a threat of his own, on Twitter, in all caps.

To Iranian President Rouhani: NEVER, EVER THREATEN THE UNITED STATES AGAIN OR YOU WILL SUFFER CONSEQUENCES THE LIKES OF WHICH FEW THROUGHOUT HISTORY HAVE EVER SUFFERED BEFORE. WE ARE NO LONGER A COUNTRY THAT WILL STAND FOR YOUR DEMENTED WORDS OF VIOLENCE & DEATH. BE CAUTIOUS! — Donald J. Trump (@realDonaldTrump) July 23, 2018

But on Monday, Trump said he was willing to transition to direct talks.

"If they want to meet, I'll meet," he said. "No preconditions."

Trump met with North Korean dictator Kim Jong Un in June and with Russian President Vladimir Putin, whom U.S. intelligence agencies blame for interfering in the 2016 presidential election, earlier this month.

"I believe in meeting," Trump said Monday of his willingness to sit down with foreign leaders with little groundwork laid and regardless of their current relationship with the United States.

"Constructive engagement with Iran is a good thing, and the best way to achieve progress on the numerous concerns we have with Iran's activities," said David Mortlock, who worked on Iran sanctions policy for the National Security Council under President Barack Obama. "However, a meeting by itself isn't going to achieve progress. The administration needs to actually reach agreement with Iran on these issues, and abandoning the most successful agreement we have with Iran to curb its nuclear program certainly brings into question its willingness to reach an agreement with Iran on the substance."