President Trump said Monday he would be willing to meet with Iranian President Hassan Rouhani with “no preconditions,” on the heels of a fiery exchange of threats earlier this month.

“I would certainly meet with Iran if they wanted to meet. I don’t know if they’re ready yet,” Trump said, when asked at a White House press conference about a possible meeting with Rouhani.

Trump said he would set “no preconditions,” and, “If they want to meet, I’ll meet, anytime they want.”

The president already has held summits with Russian President Vladimir Putin and North Korea’s Kim Jong Un. While Trump drew bipartisan criticism for his Putin summit – specifically for initially appearing to accept Putin’s denial of U.S. election meddling – the president maintained Monday that they had a “great meeting” and stressed that he’s willing to meet with “anybody.”

US NAVY: NO SIGN OF IRANIAN HARASSMENT OF AMERICAN WARSHIPS IN 2018

The president was asked about Iran after he and the Iranian president traded threats earlier this month.

Rouhani had warned the U.S. that hostile policies could trigger the “mother of all wars,” after which Trump tweeted in all-caps: “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!”

Any such meeting, if ever scheduled, would surely tackle Trump’s decision earlier this year to pull out of the Obama-era pact calling on Iran to scale back its nuclear program in exchange for reduced sanctions. Trump has suggested he could be laying the groundwork for a new nuclear deal.

Late Monday, National Security Council spokesman Garrett Marquis stated that Trump "is open to dialogue and negotiation as a means of resolving important national security issues. If the Iranian regime changes its behavior and commits to doing what is in the best interest of its people, the United States is prepared to take actions to end sanctions, reestablish full diplomatic and commercial relations, permit Iran to have advanced technology, and support the reintegration of the Iranian economy into the international economic system.

"However, this relief is only possible if there are tangible, demonstrated, and sustained shifts in Tehran’s policies," Marquis added. "Until then, the sting of sanctions will only grow more painful if the regime does not change course."

In contrast with his tweet, Trump assumed a more measured tone during the joint press conference Monday, alongside visiting Italian Prime Minister Giuseppe Conte.

He said such a meeting would be the “appropriate thing to do,” and would come neither from a position of strength nor weakness. Ironically, his willingness to entertain such a meeting echoes statements made by then-candidate Barack Obama during the 2008 campaign.

As for the continuing fallout from the Putin summit, Trump stressed Monday that sanctions on Russia “will remain as is.”

Trump, at the press conference, also reiterated his weekend threat of a government shutdown if Congress does not meet his demands on border security measures and funding for a wall.

“I would have no problem doing a shutdown. It’s time we had proper border security,” Trump said, as both he and Conte underscored the need for strong immigration enforcement.

“I’ll always leave room for negotiation,” Trump later added, when asked to clarify.

Asked if his call for $25 billion for a border wall is a “red line,” Trump said, “I have no red line, unlike President Obama” – a reference to his predecessor’s infamous statement about chemical weapons use in Syria.

Earlier Monday, Trump endorsed Italy's handling of immigration issues as he welcomed the country’s new premier to the White House for talks on trade and the military.

Trump said at the start of his meeting with Conte that the country's new populist government "has taken a very firm stance on the border." The president said other European countries should follow Italy's lead on migration issues.

Italy under Conte's new government has pushed for the European Union to accept tens of thousands of migrants coming across the Mediterranean Sea every year.

Trump welcomed the prime minister to the White House for the first time since the Italian leader came to power in June, bringing together two outsider leaders who have emerged from populist waves within their countries.

Conte leads the euroskeptic coalition of the 5-Star Movement, which considers itself anti-establishment, and the right-wing, north-based League party.

Fox News' Kristin Brown and The Associated Press contributed to this report.