Demonstrators burned American and Israeli flags, as well as images of President Donald Trump, whose refusal to re-certify the nuclear deal with world powers has riled Iranians. A few burned a white sheet reading "BARJAM," the Farsi acronym for the 2015 nuclear accord that Tehran signed with world powers.
Such activities commonly mark the anniversary, which commemorates the overthrow of U.S.-backed Iranian Shah Mohammad Reza Pahlavi. That began a period of hostilities between Iran and the West, including an attack on the U.S. Embassy in Tehran and the subsequent hostage crisis.
However, President Hassan Rouhani made a point to call for unity among Iran's people across its political spectrum, from hard-liners backing the theocratic government to reformists demanding change.
"When the Revolution took place, we pushed some off the revolutionary train that we should have not," Rouhani told a massive crowd at Tehran's central Azadi Square. "Today, we have to let them board the train again."
Rouhani didn't specifically name those pushed aside, though the Islamic Revolution and its aftermath saw the Islamists surrounding Ruhollah Khomeini purge liberals, communists and others. More recently, Iran has put leaders of its 2009 Green Movement under house arrest, where they remain even today despite Rouhani's pledges to free them.
The comments appeared aimed as being a salve following a New Year marred by anti-government protests. The demonstrations initially focused on Iran's poor economy despite the nuclear deal, but quickly spiraled into chants directly challenging Iran's theocratic government.
In his speech, Rouhani promised more job opportunities and better economic condition in the near future. Meanwhile, dozens of hard-liners chanted: "Death to liars, death to the seditious!"
Rouhani also suggested voters could push for a "referendum" in the country, without elaborating. Some abroad have argued for a referendum to push for an overhaul of Iran's government.
"It seems like a reaction to his hard-line opponents," analyst Saeed Leilaz said. "It can be a warning to hard-liners that any further pressure against him can have broader repercussions."
Authorities arrested nearly 5,000 people in the crackdown that followed, according to Alireza Rahimi, an Iranian lawmaker. At least 25 people were killed in clashes surrounding the demonstrations, which largely were snuffed out with authorities blocking some social media apps and sending more security forces into the street.
Decades after the Islamic Revolution, Tehran has had successes abroad after years of turmoil. Iran helped push back the Islamic State group in Iraq and assisted embattled Syrian President Bashar Assad in regaining strategic ground in his country's long civil war.
At home, however, the country's economy still struggles despite the 2015 nuclear deal. The accord allowed Iran to begin selling its crude oil again on the international market, but rising food prices have squeezed the average Iranian while salaries remain stagnant and unemployment high.
A January survey by the Center for International and Security Studies at the University of Maryland and the Toronto-based firm IranPoll found that 58.4 percent of those interviewed said they found the country's economy was getting worse. Nearly 70 percent said they found Trump to be "completely hostile" toward Iran. The telephone-interview survey of 1,002 Iranians had a margin of error of 3.1 percent.
The economic protests still were on people's minds Sunday even at a pro-government rally.
"Look at these people, they have come in massive numbers here though they know there are some economic problems, too," said Samaneh Heidari, a 29-year-old teacher wearing a black chador. "We are here to show support to the revolution, it's bigger than any kind of opposition."
Demonstrator Abdolali Tehrani, 57, said he took part in the economic protests but still wanted to take part in Sunday's rally.
"I went out then for a peaceful protest against the unemployment of my two sons, both at home with bachelor's degrees," he said. "Today, I am here to say I still support the revolution that brought us independence and dignity. Revolution and the economic problems, these are two different issues."
The same sentiment was echoed by demonstrator Mehdi Mohebi. "People have the right to protest against inflation and economic troubles," he said, "The same people have come to demonstrate on the revolution anniversary to announce that they are loyal to their establishment and revolution despite all these problems."
Associated Press writer Jon Gambrell in Dubai, United Arab Emirates, contributed to this report.
Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.