On issues from climate change to healthcare, there are few things President Trump relishes more than doing the opposite of something his predecessor did. Now an eruption of anti-government protests across Iran — the biggest in nearly a decade in the Islamic Republic — offers him another way to set himself apart from President Obama.
But it's a path strewn with foreign policy pitfalls as well as potential opportunities.
Iran's leaders already are casting Trump's increasingly effusive expressions of support for the demonstrators as opportunistic meddling and are painting the demonstrators as foreign pawns, adopting a strategy that some analysts say could jeopardize the legitimacy of the nascent anti-government protests.
Trump's volley of tweets, hailing the protests only hours after they broke out Thursday night, contrasted with Obama's more muted initial response to the 2009 wave of unrest known as the "Green Movement" that followed the disputed reelection of hardliner Mahmoud Ahmadinejad as president.
Obama eventually toughened his rhetoric in response to a wide-ranging crackdown by authorities in Tehran. But he also spoke pointedly of wanting to "avoid the United States being the issue inside of Iran."
Trump has shown few such qualms so far, tweeting about the protests for three days straight as Iranians took to the streets despite a heavy police presence, tear gas and scores of arrests. The defiance gained urgency after two people were reported shot to death in the city of Dorud, about 200 miles southwest of Tehran.
"Big protests in Iran," the president tweeted Sunday from his beachfront Mar-a-Lago resort in Palm Beach, Fla. "The people are finally getting wise as to how their money and wealth is being stolen and squandered on terrorism. Looks like they will not take it any longer."
Supporters of the president, who has long called Tehran a threat to the world, consider the protests as something of a vindication of his views.
A fierce opponent of the 2015 nuclear disarmament deal that six world powers negotiated with Iran, Trump has rarely missed an opportunity to denounce the government for testing ballistic missiles and backing Shiite militant groups across the Middle East.
In October, Trump declined to certify to Congress that staying in the nuclear deal was in America's interest, a requirement under U.S. law, even though the United Nations nuclear watchdog agency has repeatedly determined that Iran is complying with its obligations under the agreement.
In mid-January, Trump will have to notify Congress again — and may decide to impose new energy sanctions that could put the United States in violation of the international accord, which was approved by the U.N. Security Council. That would alienate most U.S. allies.
Proponents of the nuclear deal argue that the protests show that it has worked — unlike North Korea, Iran has no nuclear weapons to threaten the world, and the easing of most international economic sanctions since 2015 did not strengthen the cleric-ruled government.
Anti-government demonstrations are rare in Iran, where government security forces are widespread. In this case, economic resentment was the trigger for what was initially a scattered round of unauthorized protests in a country suffering high unemployment, rising prices and endemic corruption.
But as the demonstrations spread, the message became more broadly political, according to videos shared on social media. Some featured what would previously have been unthinkable displays of defiance, such as tearing down posters of the country's supreme leader, Ayatollah Ali Khamenei.
Trump and U.S. Ambassador to the United Nations Nikki Haley cited human rights considerations in backing the protest movement — even as critics quickly noted that the Trump administration has voiced little support for human rights elsewhere.
"The USA is watching very closely for human rights violations!" Trump tweeted Sunday. Haley, in a statement, said the Iranian government was being "tested by its own citizens."
"We pray that freedom and human rights will carry the day," she said.
Trump's critics also pointed to the president's inclusion of Iranian nationals in his travel ban, suggesting that his professed sympathy for ordinary Iranian citizens now taking to the streets has clear limits.
And views are divided on whether Trump's embrace will help or hurt those challenging the clerics.
Suzanne Maloney, deputy director of the foreign policy program at the Brookings Institution, said Trump's endorsement could appear a "kiss of death," giving the government a convenient way to discredit the protests.
But writing on Twitter, Maloney also pointed to a "compelling US interest in embracing popular efforts to curtail authoritarianism in the Middle East."
Even some Trump allies, however, say his backing of the Iranian dissenters might not amount to much unless he articulates a more coherent policy toward Tehran than he has to date.
"President Trump is tweeting very sympathetically to the Iranian people," Sen. Lindsey Graham, (R-S.C.) said Sunday on CBS' "Face the Nation," but added: "You can't just tweet here — you have to lay out a plan."
For its part, Iran, like Trump, is quick to fall back on past insults to galvanize national pride.
In comments published Sunday — his first since the protests began — President Hassan Rouhani made scathing reference to Trump's gibes at the U.N. General Assembly in September, when the president denounced Iran as a "rogue nation." Trump shared video of his anti-Iran comments on Twitter this weekend.
"This gentleman who today sympathizes with our people a few months ago called us a terrorist nation, and from head to toe has been against Iran," Rouhani said.
Trump is easy to demonize in Iran since he has cast his lot decisively with Israel and Saudi Arabia, Iran's most dedicated foes in the region. Although there is no known U.S. involvement in the protests, Trump's tweets allowed Iranian officials to argue that the political unrest was fomented by outside forces.
"Our enemies, especially those who have no standing in their [own] countries and have not been elected by people, have claimed to be backing our people and our people's rights in the past few days," said Iran's interior minister, Abdolreza Rahmani Fazli, according to official media reports.
As the conflict escalated, Iranian authorities on Sunday slapped a temporary ban on Instagram and the messaging app Telegram, which were widely used to fan protest fervor. And government rhetoric has sharpened, including an ominous warning Sunday from Fazli, who said on state television that lawbreakers would "pay the price."
Regardless of Trump's stance, some analysts suggested that internal dynamics, not presidential tweets, will determine whether the wave of unrest has already crested or will continue to gain strength.
"These protests are very unlikely to result in a revolutionary tipping point for Iran," said Cliff Kupchan, chairman of the Eurasia Group, a political risk consultancy.
He noted that the demonstrations in 2009 were much larger and better organized than those now underway, and had more clearly defined goals. The Green Movement protests drew millions of people into the streets and lasted for six months.
But unrest is unpredictable, Kupchan wrote, and "coming days could take unexpected turns."
Staff writer King reported from Washington and staff writer Zavis from Beirut. Staff writer Tracy Wilkinson contributed reporting from Washington.