"I would certainly meet with Iran if they wanted to meet", he added.
In his first public remarks after the comment, Rouhani did not mention Trump at all, but instead stressed the need for the other nations involved in the nuclear deal to forge ahead with their pledges to try to salvage it.
Rouhani said in a meeting with British Ambassador Rob Macaire Tuesday Tehran will not give up its rights to export oil, and called the US withdrawal from the nuclear pact illegal. "They are having a lot of difficulty right now".
But with the U.S. about to reimpose full sanctions, starting on August 6, many in Iran are uninterested in his latest volte-face. Under "appropriate" conditions negotiation can be helpful, but now such talks would just bring humiliation to Iran, he said, according to IRNA.
"Iranian officials were skeptical of this proposal from the moment Trump made it, and senior Iranian officials issued a statement saying they considered the offer of talks 'worthless", as Trump's words contradicted his actions. "The president's war cabinet seems more inclined to bring the Iranian regime to its knees".
The withdrawal is reverberating through Iran's political system, damaging moderates and reformists who championed the diplomacy and saw relief from sanctions as the ticket to economic prosperity.
"But, negotiating with the Americans would be a humiliation now", Motahari said. Interior Minister, Abdolreza Fazli was quoted as saying by the semi-official Fars news agency.
A senior aide to Rouhani said the only way back to talks was for Washington to return to the nuclear agreement.
Rouhani's chief of staff claimed earlier this month in Iran's state-owned newspaper that Rouhani had rejected eight requests from Trump for one-on-one talks a year ago.
Many in Iran are therefore suspicious of his latest volte-face.
Iran reacted skeptically Tuesday to US President Donald Trump saying that he's willing to negotiate with his Iranian counterpart "anytime", with the head of the Revolutionary Guards dismissing the idea outright.
Some officials remained more receptive.
During a closed White House briefing with a number of organizations that favored a peaceful resolution to the Iran situation in early 2014, a colleague asked one of America's negotiators where a final deal likely would land in terms of centrifuges.
Motahari added that hardliners, who have long opposed any rapprochement with the USA, share the blame for the collapse of the nuclear deal.
"All of us believe that Trump is the enemy of Iran and Iranian people".
"But from the start one part of the system did not want the agreement to work".
On the streets of Tehran, meanwhile, the focus remained resolutely on domestic problems particularly the collapse of the currency and ongoing economic difficulties.
"COLOR US UNIMPRESSED", Iranian foreign minister Javad Zarif responded on Twitter.
President Trump has extended an olive branch to Iran's leaders just days after a tweet he wrote appeared to say he was ready to use military force should they "ever threaten the United States". Iran's semi-official ISNA news agency quoted political adviser Hamid Aboutalebi as saying that for talks to happen, the US needs to rejoin the deal. "I'll meet with anybody", he said.