Donald Trump had sharp words for Iran during his presidential campaign.
He promised to revisit or even tear up the deal over Iran's nuclear weapons program. Any Iranian vessels that harass the U.S. Navy in the Persian Gulf, he said, should be "shot out of the water."
But Iranian leaders appear to see reasons for hope in a Trump presidency.
For hard-liners in the Islamic Republic, Trump has bolstered their refrain that the United States, whatever agreements it signs with Iran, is not to be trusted — a boost to their voice in domestic politics.
Meanwhile, moderate President Hassan Rouhani and his allies are playing down concerns over Trump's rhetoric. Some quietly express optimism that the real estate tycoon would be open to negotiations in other areas dividing Washington and Tehran.
A Trump administration could be helpful in advancing Iran's road map to a political solution in Syria, some Iranian analysts suggest.
"President Rouhani is adapting his government to the new president-elect, and everybody here is betting on the flexibility of President Trump when he begins steering America in January," said Nader Karimi Juni, an independent political analyst.
As a candidate, Trump frequently denounced the nuclear deal struck between Iran and six world powers, including the United States, in 2015.
The agreement, which went into effect in January, was a signature foreign policy achievement of the Obama administration. Under its terms, Iran agreed to significant restrictions on its nuclear program — which Western officials feared could be used to produce a bomb, though Tehran says it is only for civilian purposes.
The deal called for easing of economic sanctions against Iran, though some U.S. sanctions remain in place targeting Iran's support for militant groups and its ballistic missile program.
Trump termed the deal "disastrous," saying it conceded too much to Iran. He said it would be one of the first things he would renegotiate as president. Iran has shown no willingness to reopen talks on an agreement that has reduced its diplomatic isolation and opened the way to fresh foreign investment, although it has failed to bring about the sweeping economic improvements Rouhani promised.
Trump also drew criticism in Iran for saying that Iranian ships that provoked the United States would be "shot out of the water," a reference to Iran's brief detention of 10 American sailors who veered into Iranian waters in January.
But in remarks this week, Iranian leaders did not appear concerned, and said Trump's election would not have an effect on their policies.
Supreme leader Ayatollah Ali Khamenei said Iran was "not worried" about a Trump presidency because it would be no different from previous U.S. administrations.
"Over the past 37 years, any major U.S. party that came to power brought us no good," Khamenei said in remarks broadcast on state television. "Their evil was always directed toward the Iranian nation."
Iran and the United States have had no diplomatic relations since 1979, when militant students stormed the U.S. Embassy in Tehran and took hostages in retaliation for Washington's refusal to hand over ousted monarch Mohammed Reza Shah Pahlavi.
Rouhani, in a speech broadcast on state TV, did not mention Trump by name but said a change in presidents "has no impact on the will of Iran."
Although Trump's campaign unsettled some Iranians, others said he and Iranian leaders would have room to compromise.
Trump has signaled he would seek greater cooperation with Russia in the fight against Islamic State in Iraq and Syria. That is one area where he would find common ground with Iranian hard-liners, who back Syrian President Bashar Assad in the battle against Islamic State, also known by the Arabic acronym Daesh.
"If Trump proves to be anti-Daesh enough and allies with Russia and the Syrian regime against Daesh, there will be more scope for negotiation between Iran and America," Bahman Eshghi, secretary general of the Tehran Chamber of Commerce, said in an interview.
Others hoped that Trump would be more like President Reagan, whose administration covertly sold weapons to Iran to use in its decade-long war with Iraq, in what became known as the Iran-Contra scandal.
"Our experience shows that President Reagan was more helpful to Iran during the war with Iraq," said Juni, the analyst. "I think Trump might do some good business with Iran despite both sides keeping up their hostile rhetoric against each other."
But three top names on the shortlist for Trump's Cabinet are worrisome to Iranian officials: Former House Speaker Newt Gingrich, former New York Mayor Rudolph W. Giuliani and former U.N. Ambassador John Bolton are outspoken supporters of the Mujahedin Khalq, an Iranian dissident group in exile that Tehran regards as a terrorist organization.
"All three — Gingrich, Bolton and Giuliani — are subversive against the Iranian regime," said Hojjat Kalashi, a secular analyst.
Special correspondent Mostaghim reported from Tehran and staff writer Bengali from Mumbai, India.
Follow @SBengali on Twitter for more news from South Asia
12:50 p.m.: This article was updated with additional details about the future of U.S-Iran relations.