Iran witnessed a second night of protests, some violent, after the government admitted it had mistakenly downed a Ukrainian passenger jet.

Videos posted on social media, which couldn’t immediately be verified by Bloomberg News, showed clashes between protesters and riot police, trails of blood on a main street, chants in opposition to Supreme Leader Ayatollah Ali Khamenei, and calls to rid the country of the Islamic Revolutionary Guards Corps. Protesters in the videos said arrests had been made and tear gas fired at crowds.

Anger spread across the globe after Iran’s leaders admitted on Saturday that its military shot down the Ukrainian jet after mistaking it for a cruise missile, killing all 176 people on board.

The announcement was a dramatic reversal after the regime spent days accusing Western governments of “psychological warfare.” Iran’s government said Sunday it was forming a working group to probe the crash and compensate victims.

President Donald Trump, who a week ago threatened to bomb Iranian cultural sites, sent a series of tweets in Farsi over the weekend expressing support for protesters and warning Iran’s leaders not to intervene. “DO NOT KILL YOUR PROTESTERS,” Trump said.

Protesters, many of them students, came out in force in Tehran’s landmark Azadi Square and at Shahid Beheshtri University, as well as in several regional cities. Earlier, videos showed motorcycle-mounted security forces in green camouflage and anti-riot body armor stationed on Tehran’s central Valiasr Square. There was also heavy police presence outside Tehran University.

On Saturday, large crowds of students demonstrated outside Amir Kabir University in downtown Tehran for a candlelight vigil, according to witnesses, before starting chants of “death to the dictator” and “resignation is not enough, a trial is needed!” Security forces intervened to disperse the demonstrators. The British Ambassador to Iran Rob Macaire was briefly detained after he attended the vigil, triggering an international incident.

Others used social media to vent their anger, contrasting the plane deaths with reports that the Iranian attack on the Iraqi bases on Wednesday when the plane was downed was specifically designed not to injure Americans.

The government’s admission that Iran’s security forces hold ultimate responsibility for the downing of the plane — albeit at a time of conflict with their chief foe — is a further blow for the country’s ruling clerics at a time when the economy has been devastated by U.S. sanctions. It appears to have undercut the sense of national unity that built after the Jan. 3 killing by the U.S. of General Qassem Soleimani, a hero to many Iranians for his work in Iraq and Syria helping to defeat Islamic State.

On Sunday, General Hossein Salami, commander of Iran’s Revolutionary Guards, apologized for the jet downing during a speech in parliament, CBS reported, citing Iranian state television.

“I swear to almighty God that I wished I were in that plane and had crashed with them and had burned, and had not witnessed this tragic incident,” Salami said.

Canadian Prime Minister Justin Trudeau Saturday said he was “outraged” and “furious” by the shooting down of Ukrainian International Airlines Flight PS752. At least 57 Canadians were among the dead.

“What Iran has admitted to is very serious,” Trudeau said Saturday at a press briefing in Ottawa. He earlier declared the incident a national tragedy. “Shooting down a civilian aircraft is horrific. Iran must take full responsibility.“

Ukrainian President Volodymyr Zelenskiy said he wants a full admission of guilt by Iran for what authorities there called a “disastrous mistake.”

Ukraine and Iran will work jointly to decode the black boxes of the Boeing jet, Zelenskiy said. The Ukrainian government will make payments to the families of each of those who died in the crash, he said.

The three-year-old Boeing Co. 737-800 was shot down about two minutes after takeoff from Tehran. The tragedy occurred hours after Iran started launching rockets against Iraqi bases where U.S. forces are stationed, in retaliation for Soleimani’s killing. Nearly half the victims were Iranians, while many of the other passengers, including citizens of Canada, Sweden and the U.K., were of Iranian descent.

U.S. Defense Secretary Mark Esper said Iran was attempting to make itself the victim by blaming the jet incident, in part, on the escalation in tensions with Washington.

“Clearly, it was just a horrible mistake,” Esper said in an interview with CBS News. “To somehow allow Iran to play the victim card with the international community is just ridiculous.”

The commander of the IRGC’s aerospace force, Amir Ali Hajizadeh, blamed the tragedy on a communications failure. The operative who first mistakenly identified the plane as an incoming missile failed to get a second opinion due to a “disturbance” and had only 10 seconds to make a decision, he said. The army had previously said that “culprits” would be turned over to judicial authorities.

Iran’s supreme leader offered his condolences to the victims of the Ukrainian flight, while President Hassan Rouhani said the Islamic Republic “deeply regrets the disastrous mistake” and vowed compensation for the families of victims.

Meanwhile, the fate of the 2015 Vienna Nuclear Agreement between world powers and Iran hung in the balance. Germany, France and the U.K. on Sunday affirmed their commitment to the deal, which Trump pulled the U.S. out of in 2018.

Tehran this month announced it would stop abiding by limits on uranium enrichment, which had been agreed to in return for sanctions relief. The U.S. has instead pressed ahead with a series of measures against the Islamic Republic.

Additional U.S. sanctions announced last week, and a new executive order signed by Trump, “gave us additional capabilities to target both primary and secondary sanctions in different sectors, including the metals industry, construction, and travel,” U.S. Treasury Secretary Steven Mnuchin said Sunday on Fox News.

--With assistance from Alan Levin, Siraj Datoo, John Harney, Jon Morgan, Daryna Krasnolutska, Vanessa Dezem and Arsalan Shahla.