An ambush-style attack killed five police officers in downtown Dallas on Thursday night when a peaceful protest against the deaths of two black men—killed by police this week—devolved into chaos.

Seven officers and two civilians were also injured in the attack, the mayor’s office said, CNN reported.

Dallas Police Chief David Brown said three people were taken into custody. Dallas Mayor Mike Rawlings said another suspect, who was engaged in a standoff with police at a parking garage, died. Police used explosives to “blast him out,” the Associated Press reported.

More Bloody Aftermath Of Police Shooting Streamed On Facebook

The violent events unfolded after a spike in threats against police were made across social media over the last week. From July 1 to early Friday morning, a total of 10,704 tweets used the anti-cop hashtag #Fuck12, with a significant spike on the morning of July 6—a day after Alton Sterling was shot dead by police officers in Baton Rouge, Louisiana, Vocativ discovered. According to Urban Dictionary, the “12” specifically refers to narcotics officers.

It remains unclear, however, who was behind the Dallas shooting and what motivated it.

Early on Friday, use of the hashtag to threaten and condemn police continued as events in Dallas unfolded. Some appeared to be using it to celebrate the deaths of the police officers killed in Dallas. It was also posted on Facebook and Instagram, sometimes alongside pictures of weapons.

Without that badge you a bitch and a half #FuckThePolice #Fuck12 — SELFPAID™ (@QuezSelfPaid) July 6, 2016

https://twitter.com/1freshrich/status/751278238513524740

SUTINN LITE ! #Fuck12 A photo posted by Black Mamba (@__youngcorleone) on Jul 7, 2016 at 10:37pm PDT

The hashtag has been used since at least December 2014, when it was posted to celebrate the murder of two NYPD officers. Now it’s being used to hurl anger at police over the deaths of Alton Sterling and Philando Castile, who was shot on Wednesday evening by a police officer during a traffic stop in a suburb of St. Paul, Minnesota. He died later that night in a hospital, his family has said.

Both incidents were captured on video, which was critical in drawing nationwide attention to the incidents and sparking protests.