In his last few seconds of life, Alton Sterling seemed completely immobile. Two Baton Rouge, Louisiana, police officers had pinned him to the floor, flat on his back. But even as Sterling seemed completely unable to move, one of the police officers yelled, "He’s got a gun!" Within seconds, an officer shot Sterling, who was still pinned to the ground by the cops. Sterling died of multiple gunshot wounds.

After a bystander released video of the 2016 shooting, people quickly protested in the area and voiced their anger on social media. Several people went to the convenience store where Sterling was shot, holding up "black lives matter" and "hands up, don’t shoot" signs.

But nearly two years later, Louisiana Attorney General Jeff Landry on Tuesday announced that no charges will be filed against the two Baton Rouge police officers involved, Blane Salamoni and Howie Lake. He said that their actions were "well-rounded and reasonable."

"This decision was not taken lightly," Landry said. "We came to this conclusion after countless hours of reviewing the evidence."

Last year, the US Department of Justice similarly decided to not press civil rights charges against the officers.

Though the officers will not face criminal charges, the Baton Rouge Police Department on Friday announced disciplinary action against both men. Salamoni was fired for violating the department's use-of-force policies. The other officer, Lake, received a three-day suspension without pay.

Sterling’s death was another in a long string of police shootings to lead to outrage, particularly from the Black Lives Matter and racial justice movements against racial disparities in the criminal justice system. To many critics, it was just another example of an issue that quickly rose to the national spotlight after the police shooting of Michael Brown in Ferguson, Missouri, in August 2014.

Police officers shot Alton Sterling while he was seemingly pinned to the ground, unable to move

Warning: graphic footage of a police shooting:

According to the Advocate, Baton Rouge police officers Blaine Salamoni and Howie Lake responded to a call at a convenience store around 12:35 am on July 5 after receiving an anonymous tip that a man in a red shirt who was selling CDs had pointed a gun at someone. Sterling, a 37-year-old black man, matched part of the description: He sold CDs, and he was wearing a red shirt.

The officers approached Sterling aggressively, according to body camera videos released nearly two years after the shooting — after the officers were cleared of charges. Initially, the police department had suggested that body camera videos were not available or not revelatory.

Based on the footage, Salamoni and Lake immediately began telling Sterling to put his hands on a nearby car. Sterling asked, "What I did?" The officers then grabbed him and pushed him toward the car.

Salamoni, drawing his weapon, then yelled, "Don't fucking move or I'll shoot your fucking ass, bitch." He and the other officer again told Sterling to put his hands on the car. Salamoni continued threatening Sterling, saying, "Don't you fucking move or I'm going to shoot you in your fucking head," while putting his gun to Sterling's head.

It is unclear how someone is supposed to simultaneously avoid moving and put his hands on a car.

Sterling replied, "All right, all right." He complained that the officers were hurting his arm. He continued asking what went wrong. The officers then used a stun gun on him, ordering Sterling to get on the ground. The officers then tackled and pulled Sterling to the ground. The body cameras are dislodged at that point, blocking view of the moments after.

Two cellphone videos recorded by bystanders, one published by the Daily Beast after the shooting drew national attention, show what happened next: The officers pinned Sterling on his back. An officer yelled, "He’s got a gun!" One officer aimed his gun at Sterling’s chest at virtually point-blank range. Within seconds, at least one officer opened fire, even though Sterling looks completely pinned down and unable to move. One officer then pulled out an object — it’s not clear what it is — from Sterling’s right pants pocket. Sterling was pronounced dead shortly after.

Warning: graphic footage of a police shooting:

Shop owner Abdullah Muflahi told the Advocate that the officers were "aggressive" from the start, and that Sterling was armed but was not holding his gun and didn’t have his hand near his pocket at the time of the shooting.

Police reportedly found a .38-caliber handgun in Sterling's pocket after the shooting.

As the Advocate reported, Sterling had a criminal record. But Sterling’s previous convictions aren’t what’s relevant to the shooting. The legal standard for use of force requires officers to reasonably perceive a threat at the moment of use of force.

Since Sterling was seemingly immobile in the videos of the shooting, critics argue that he was not in fact a threat and the shooting is another example of excessive use of force against a black man.

Black people are much more likely to be killed by police than their white peers

Based on nationwide data collected by the Guardian, black Americans are more than twice as likely as their white counterparts to be killed by police when accounting for population. In 2016, police killed black Americans at a rate of 6.66 per 1 million people, compared to 2.9 per 1 million for white Americans.

Black teens were 21 times as likely as white teens to be shot and killed by police between 2010 and 2012, according to a ProPublica analysis of the FBI data. Ryan Gabrielson, Ryann Grochowski Jones, and Eric Sagara reported for ProPublica: "One way of appreciating that stark disparity, ProPublica’s analysis shows, is to calculate how many more whites over those three years would have had to have been killed for them to have been at equal risk. The number is jarring — 185, more than one per week."

There have been several high-profile police killings since 2014 involving black suspects. In Baltimore, six police officers were indicted for the death of Freddie Gray while in police custody. In Ferguson, Darren Wilson killed unarmed 18-year-old Michael Brown. In New York City, NYPD officer Daniel Pantaleo killed Eric Garner by putting the unarmed 43-year-old black man in a chokehold.

One possible explanation for the racial disparities: Police tend to patrol high-crime neighborhoods, which are disproportionately black. That means they're going to be generally more likely to initiate a policing action, from traffic stops to more serious arrests, against a black person who lives in these areas. And all of these policing actions carry a chance, however small, to escalate into a violent confrontation.

That's not to say that higher crime rates in black communities explain the entire racial disparity in police shootings. A 2015 study by researcher Cody Ross found, "There is no relationship between county-level racial bias in police shootings and crime rates (even race-specific crime rates), meaning that the racial bias observed in police shootings in this data set is not explainable as a response to local-level crime rates." That suggests something else — such as, potentially, racial bias — is going on.

One reason to believe racial bias is a factor: Studies show that officers are quicker to shoot black suspects in video game simulations. Josh Correll, a University of Colorado Boulder psychology professor who conducted the research, said it’s possible the bias could lead to even more skewed outcomes in the field. "In the very situation in which [officers] most need their training," he said, "we have some reason to believe that their training will be most likely to fail them."

Part of the solution to potential bias is better training that helps cops acknowledge and deal with their potential prejudices. But critics also argue that more accountability could help deter future brutality or excessive use of force, since it would make it clear that there are consequences to the misuse and abuse of police powers. Yet right now, lax legal standards make it difficult to legally punish individual police officers for use of force, even when it might be excessive.

Police only have to reasonably perceive a threat to justify shooting

Legally, what most matters in police shootings is whether police officers reasonably believed that their lives were in immediate danger, not whether the shooting victim actually posed a threat.

In the 1980s, a pair of Supreme Court decisions — Tennessee v. Garner and Graham v. Connor — set up a framework for determining when deadly force by cops is reasonable.

Constitutionally, "police officers are allowed to shoot under two circumstances," David Klinger, a University of Missouri St. Louis professor who studies use of force, previously told Dara Lind for Vox. The first circumstance is "to protect their life or the life of another innocent party" — what departments call the "defense-of-life" standard. The second circumstance is to prevent a suspect from escaping, but only if the officer has probable cause to think the suspect poses a dangerous threat to others.

The logic behind the second circumstance, Klinger said, comes from a Supreme Court decision called Tennessee v. Garner. That case involved a pair of police officers who shot a 15-year-old boy as he fled from a burglary. (He’d stolen $10 and a purse from a house.) The court ruled that cops couldn’t shoot every felon who tried to escape. But, as Klinger said, "they basically say that the job of a cop is to protect people from violence, and if you’ve got a violent person who’s fleeing, you can shoot them to stop their flight."

The key to both of the legal standards — defense of life and fleeing a violent felony — is that it doesn’t matter whether there is an actual threat when force is used. Instead, what matters is the officer’s "objectively reasonable" belief that there is a threat.

That standard comes from the other Supreme Court case that guides use-of-force decisions: Graham v. Connor. This was a civil lawsuit brought by a man who’d survived his encounter with police officers, but who’d been treated roughly, had his face shoved into the hood of a car, and broken his foot — all while he was suffering a diabetic attack.

The court didn’t rule on whether the officers’ treatment of him had been justified, but it did say that the officers couldn’t justify their conduct just based on whether their intentions were good. They had to demonstrate that their actions were "objectively reasonable," given the circumstances and compared to what other police officers might do.

What’s "objectively reasonable" changes as the circumstances change. "One can’t just say, 'Because I could use deadly force 10 seconds ago, that means I can use deadly force again now," Walter Katz, a California attorney who specializes in oversight of law enforcement agencies, previously said.

In general, officers are given lot of legal latitude to use force without fear of punishment. The intention behind these legal standards is to give police officers leeway to make split-second decisions to protect themselves and bystanders. And although critics argue that these legal standards give law enforcement a license to kill innocent or unarmed people, police officers say they are essential to their safety.

For some critics, the question isn’t what’s legally justified but rather what’s preventable. "We have to get beyond what is legal and start focusing on what is preventable. Most are preventable," Ronald Davis, a former police chief who previously headed the Justice Department’s Office of Community Oriented Policing Services, told the Washington Post. Police "need to stop chasing down suspects, hopping fences, and landing on top of someone with a gun," he added. "When they do that, they have no choice but to shoot."

Police rarely get prosecuted for shootings

Police are very rarely prosecuted for shootings — and not just because the law allows them wide latitude to use force on the job. Sometimes the investigations fall onto the same police department the officer is from, which creates major conflicts of interest. Other times the only available evidence comes from eyewitnesses, who may not be as trustworthy in the public eye as a police officer.

"There is a tendency to believe an officer over a civilian, in terms of credibility," David Rudovsky, a civil rights lawyer who co-wrote Prosecuting Misconduct: Law and Litigation, told Amanda Taub for Vox. "And when an officer is on trial, reasonable doubt has a lot of bite. A prosecutor needs a very strong case before a jury will say that somebody who we generally trust to protect us has so seriously crossed the line as to be subject to a conviction."

If police are charged, they’re very rarely convicted. The National Police Misconduct Reporting Project analyzed 3,238 criminal cases against police officers from April 2009 through December 2010. They found that only 33 percent were convicted, and only 36 percent of officers who were convicted ended up serving prison sentences. Both of those are about half the rate at which members of the public are convicted or incarcerated.

The statistics suggest that it would have been a truly rare situation if the officers involved in the Sterling shooting were charged with and convicted of a crime.