Protests that began as vigils to mourn those who died in the crash quickly turned into mass anti-government demonstrations, with calls for Supreme Leader Ayatollah Ali Khamenei to step down and for those responsible for downing the plane to be prosecuted.

"Death to the dictator," some chanted in the capital, Tehran, in footage posted on social media. In one video, demonstrators chanted, "Khamenei have shame. Leave the country."

Khamenei has been in office for three decades, and there is no limit to his term.

Videos circulating on social media showed demonstrators in Tehran coughing and fleeing from tear gas as authorities apparently detained protesters while others shouted for police to release them.

The Ukraine International Airlines jet that was shot down had passengers from around the world on board, but in Iran, many see the incident as a particularly domestic tragedy. Many people are angry that the government killed so many of its own people -- most of those on board were Iranian nationals and people of Iranian heritage.

Some protesters could be heard shouting "we will kill whoever killed our brothers" in video posted to social media that CNN could not independently verify.

A woman attending a candlelight vigil for the victims of the Ukraine International Airlines crash, talks to a policeman following the gathering in front of the Amirkabir University in Tehran.

Image of a unified country

Protests have spread to other cities, including Shiraz, Esfahan, Hamedan and Orumiyeh, Reuters reported, exposing widespread discontent with the regime.

The angry crowds are a marked difference from the image of a unified country in mourning seen following the death of top commander Qasem Soleimani, who was killed in a US drone strike in Baghdad, Iraq last week.

Following his death, tens of thousands of people took to the streets of Tehran clutching photos of the revered and powerful figure and chanting "death to the USA."

Widespread reverence for Soleimani, who commanded a cult-like status in the country, had seemingly united Iranians of all political stripes in anger at the US.

But at protests over the weekend, posters of Soleimani had reportedly been torn down, according to Agence France-Presse.

Security forces were deployed in key areas of the capital over the weekend, including Azadi Square near Sharif University, Enghelab (Revolution) Square near Tehran University, and Ferdowsi Square.

Fully equipped riot police were on patrol, accompanied by water cannons and black vehicles that are sometimes used as mobile detention centers.

But protesters appeared undeterred in their anger, testing the limits and patience of the Iranian regime which is known for suppressing all dissent, often brutally.

Late last year thousands of Iranians took to the streets in nationwide anti-government protests sparked by a hike in gas prices in November.

The government responded by shutting down the internet and unleashing what Amnesty International described as a "bloody clampdown." The human rights organization estimated that at least 208 protesters had been killed in 21 cities, citing "credible reports." The United Nations said it had video evidence that Iranian security forces were "shooting to kill."

US President Donald Trump has tweeted his support for the demonstrators and warned Iran in a series of tweets over the weekend: "Do not kill your protesters."

"Thousands have already been killed or imprisoned by you, and the World is watching," the President said, later retweeting his post in Farsi.

Demonstrators chant during a vigil for the victims of the Ukraine airliner crash in Tehran on January 11.

Pressure from home and abroad

During an open session of Iran's parliament in Tehran Sunday, the chief commander of Iran's Revolutionary Guards Corps, Hossein Salami, apologized for unintentionally shooting down the Ukrainian plane and asked for forgiveness.

"We did made a mistake. Some of our compatriots were martyred because of our mistake but it was unintentional," Salami said. "In my all lifetime I haven't been as sorry as much as now. Never."

"I wish I had been on board and burned with them," he continued.

Iran's President Hassan Rouhani said his country "deeply regrets this disastrous mistake" and his "thoughts and prayers go to all the mourning families."

Iran previously denied US claims that the country had struck down the plane before admitting the mistake Saturday.

The apologies did little to quell protests and, while the Iranian leadership faces public opposition at home, international pressure is piling on the regime to investigate the crash and hold those responsible to account.

The downed plane's victims included 57 Canadians, and that country's Prime Minister Justin Trudeau told a press conference Saturday that, "Canada will not rest until we get the accountability, justice and closure that the families deserve."

Fresh criticism was also leveled at Iran for the temporary arrest Saturday of British Ambassador Rob Macaire.

According to the semi-official Tasnim news agency, Macaire was arrested while in the middle of a crowd of protesters in front of Tehran's Amir Kabir University. He was accused of instigating and directing radical and destructive demonstrations, and later released. Macaire said on Twitter that he wasn't taking part in any demonstrations -- and was instead paying respect to victims of the downed Ukrainian plane.

UK Foreign Secretary Dominic Raab called Macaire's arrest a "flagrant violation of international law" -- a sentiment echoed by the German and French foreign ministries.

Following his release, protesters gathered outside the embassy in Tehran on Sunday, with video showing demonstrators carrying images of Soleimani and burning the UK flag.

Meanwhile, Supreme Leader Khamenei on Sunday blamed the "corruptive presence of the US and its cohorts" for the "current turbulent situation" and has called for the strengthening of relations between countries in the region.

"The current situation in the region demands -- more than ever before -- the strengthening of relations between countries in the region as well as avoiding the influence of foreigners' inductions," Khamenei said, following a meeting with Qatar's leader Sheikh Tamim bin Hamad Al Thani.

Hours before the airline disaster, Iran fired missiles at Iraqi military bases housing US troops in retaliation for the drone strike. Amid rising tensions in the region, eight Katyusha rockets hit Iraq's Balad Air Base, north of Baghdad, on Sunday, wounding four Iraqi air force officers, the Iraqi military said in a statement. No American or coalition forces were at the base when the rockets struck, a US military official told CNN.