Receive the latest national-international updates in your inbox

In this Nov. 4, 2013, file photo, women stand next to the wall of former US embassy during a demonstration to mark the 34th anniversary of the 1979 US embassy takeover in Tehran, Iran.

Hundreds of thousands of Iranians rallied on the streets Sunday to mark the 39th anniversary of the 1979 Islamic Revolution, just weeks after anti-government protests rocked cities across the country.

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 at 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!"

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.