Iran's most powerful authority, Supreme Leader Ayatollah Ali Khamenei, on Tuesday called Iranians to take part in Friday's demonstrations to show Iran is not frightened of American "threats."
Iranians in Tehran marched towards Azadi (Freedom) Square on Friday to commemorate the 38th anniversary of Iran's 1979 Islamic Revolution that toppled the US-backed shah.
Similar gatherings were held across Iran, where hundreds of thousands of Iranians rallied to swear allegiance to the clerical establishment, Iranian state TV reported.
US President Donald Trump had warned Iran last week that he had put the Islamic Republic "on notice" following a January 29 Iranian missile test, imposing fresh sanctions on individuals and entities.
Trump has also criticised a nuclear deal reached between Iran, the United States, and other major powers in 2015, aimed at curbing the country's nuclear work.
Iranian President Hassan Rouhani, speaking at a march in Tehran on Friday, warned those using "threatening language" against Tehran would regret it as the regime faces increasingly hawkish rhetoric from the new US administration.
"This turnout is a response to false remarks by the new rulers in the White House and the people are telling the world through their presence that the Iranian people must be spoken to with respect," Rouhani said.
"America and Trump cannot do a damn thing. We are ready to sacrifice our lives for our leader Khamenei," a young Iranian man told state TV.
Iranian state television said millions turned out nationwide at revolution rallies marked by the traditional anti-US and anti-Israel slogans and the burning of US flags. On social media, like Twitter and Facebook, many Iranians used #LoveBeyondFlags, urging an end to flag-burning during the anniversary.
They also thanked Americans for opposing Trump's executive order banning travellers from seven mainly Muslim countries, including Iran.