The decision of Minneapolis prosecutors to criminally charge a police officer four days after the death of George Floyd shows how efforts to hold officers accountable often hinge on the level of public protest and whether the incident was caught on video.

Even then, it is rare for officers to be charged criminally in such incidents, with the swiftness of the Floyd charges something of an anomaly.

Derek Chauvin, the officer seen on a bystander’s cellphone video kneeling on Floyd’s neck on Monday before the 46-year-old man died, was charged on Friday with third-degree murder and manslaughter.

US Attorney General William Barr on Friday said the FBI would conduct its own investigation.

The killing, the video of which has been widely viewed on social media and on television, spurred three nights of protest in Minneapolis that at times turned violent.

“Thank God a young person had a camera to video it,” Minnesota Governor Tim Walz said of Floyd’s death, noting that in many instances no footage exists.

In contrast, an investigation into the March 13 killing by Louisville, Kentucky, police of emergency medical technician Breonna Taylor, in which there was no viral video, remains ongoing.

The FBI said it launched an investigation into her death on May 21, more than two months later. The city’s police chief, Steve Conrad, will retire at the end of June, Louisville’s mayor said the same day. None of the three officers involved in the raid have been charged as of Friday.

The sporadic nature of criminal charges frustrates civil rights activists.

“We are not seeing officers held accountable at the rates they should be. The number of shootings of unarmed African-Americans far exceed the number of officers being held accountable,” said Kristen Clarke, president of the Lawyers’ Committee for Civil Rights Under Law.

In other high-profile cases, criminal charges have been brought after public protests, but not as quickly as in Minneapolis.

In Baltimore, police officers were charged over the death of Freddie Gray only after the aftermath led to riots. Gray was arrested on April 12, 2015 in an incident caught on video and subsequently given a “rough ride” in the back of a police van, injuring his spine. He died of his injuries a week later and hundreds of people attended his funeral on April 27. Later that night, riots erupted in the neighborhood where he was arrested.

Four days later, on May 1, the city charged six officers for their role in his death. All six were eventually cleared, and the federal Justice Department declined to charge anyone involved in the case.

In other cases there are no criminal charges, such as in the death of Eric Garner in New York in 2014, which was captured on video and led to protests. He died in a chokehold after repeatedly crying “I can’t breathe” — a plea that became a rallying cry for the Black Lives Matter movement and was heard again in videos of Floyd’s death.

In one illustration of the power of bystander video, groups representing law enforcement officers say they do not object to the additional scrutiny of either bystander video or cameras that officers are increasingly required to wear.

“We favor the use of body cameras, and we don’t have a position on the constitutional right of an individual in a public place to use a camera,” said Jim Pasco, executive director of the National Fraternal Order of Police.

He also said he didn’t see any particular problems with the speed with which charges were brought against Chauvin.