CHICAGO — There is a grim routine to the police shootings that have divided this country in recent years. First, we learn the names and ages of the deceased. We see them smiling in old family photos. We watch as their names trend on Twitter: Michael Brown, Philando Castile, Tamir Rice.

A day — or maybe a week — later, the officer who fired the fatal shots is identified. We examine the officer’s background and scrutinize body camera footage. The officer’s name circulates on social media, often alongside labels like “murderer” and “pig.”

Against the backdrop of widespread racial disparities in policing, with reams of evidence that African-Americans are more likely to be stopped, searched and killed by law enforcement officials, many view these officers as predators to whom the normal rules do not apply. To others, they are honorable men and women victimized by the political climate and skewered over a hard decision made in a split second.

The officers themselves are rarely heard from. Overnight pariahs, they hunker down in a state of semi-seclusion — turning in their guns, shutting off their cellphones, living with the fact that they caused a death. And though they are usually cleared in the criminal arena, the reckoning, both personal and professional, can continue long after the public’s attention has shifted to the next shooting.

In St. Paul and Cincinnati, trials have begun for police officers involved in high-profile shooting deaths of black men during traffic stops. Other cases continue to unfold: Last week, the Cleveland officer who shot and killed 12-year-old Tamir Rice in 2014 was fired. In recent weeks, administrative charges were filed against five of the Baltimore police officers involved in the 2015 death of Freddie Gray. In Oklahoma, jurors acquitted Officer Betty Jo Shelby of manslaughter in the 2016 death of Terence Crutcher, the unarmed black man she shot and killed along a Tulsa roadway.

“The night of the shooting, I shut down my Facebook account, deleted all news apps, kept the TV off at home and handed my phone to my husband,” Officer Shelby recalled recently.

As she awaited trial with her salary suspended, Officer Shelby found herself on the unfamiliar end of the criminal justice system. Like many people accused of serious crimes, she was unable to find temporary work. She and her husband, Dave, braced for the possibility of her spending decades in the state penitentiary. She planned how to explain that to her 4-year-old grandson, Luke.

“I made it clear that I didn’t want Luke to come to the prison if that’s where I was,” Officer Shelby said. “But I wanted Dave to share the truth with Luke and to explain that actions have consequences.”

She also went through a “grieving process” over Mr. Crutcher’s death, she said.

Suddenly the worst kind of local celebrity, she feared for her safety and rarely left home except to attend church or meet with her lawyers. A man pleaded guilty to making a death threat against her.

All that was reflective of the controversy around the shooting and police violence in general, with rising public anger over episode after episode in which video evidence contradicted official explanations.

Officer Shelby’s case was murkier than many others, but the shooting still defied easy explanation.

She encountered Mr. Crutcher on a city street, followed him back to his car and yelled commands that he ignored. Before she fired, she said, she thought Mr. Crutcher was reaching for a gun through the car window. The gun turned out not to exist.

At her trial, Officer Shelby testified that she had fired because “I meet a gun with a gun.” But her explanation was panned by prosecutors, who argued that she acted unreasonably and misjudged the threat.

“In this situation, though,” the prosecutor, Kevin Gray, responded, “you’re not meeting a gun with a gun. You’re meeting a guess about a gun with a gun.”

Mr. Crutcher’s family called the shooting unjustified, urging jurors to convict.

Shannon McMurray, Officer Shelby’s lawyer, said that her client’s actions were reasonable and that prosecutors “were so concerned with civil unrest that they just charged her.”

She added: “It was just a bad time for a police shooting.”

Much of the public outrage has centered on what is seen as a failure to hold officers criminally accountable for their actions, resulting in mistrust that can taint even earnest attempts to reach a just outcome. But even in cases where criminal charges never materialize, officers can face an array of other consequences, including civil lawsuits and job loss.

In Chicago, Officer Robert Rialmo — who in 2015 fatally shot a black teenager wielding a baseball bat and an innocent, African-American bystander — braced for the investigation and news media scrutiny even before he left the scene.

“I knew it was going to be a huge deal,” Officer Rialmo recalled recently. “I knew that right away.”

The month before, another Chicago officer had been charged with first-degree murder in the shooting of another black teenager, Laquan McDonald, touching off weeks of protests.

Officer Rialmo’s case became national news. Mayor Rahm Emanuel flew home early from a Caribbean vacation to deal with the fallout. The police superintendent announced a new policy that would bench Officer Rialmo and all officers involved in future shootings for at least 30 days.

“I understood why,” said Officer Rialmo, who more than 500 days later remains on desk duty, awaiting the results of an investigation by the city’s police review agency, which could lead to discipline or dismissal. “But it was frustrating. It still is frustrating for me.”

In an interview last month, Officer Rialmo said he was at peace with his decision to shoot, but was not unaffected by the results. “I knew that I wasn’t taking that bat upside the head,” he said.

It was clear that he drew a sharp distinction between the two lives he took. He said Quintonio LeGrier, the teenager with the baseball bat, had left him no choice but to open fire.

“Her death was his fault,” Officer Rialmo said, referring to the bystander and recalling something that he said a Police Department psychologist had told him. “I understood that. I knew that right away. I know that now.”

Officer Rialmo faces lawsuits from the estates of Mr. LeGrier and the bystander, Bettie Jones, whose lawyers have each disputed his version of events.

“He took a great woman from us that we can never get back,” said Latisha Jones, Ms. Jones’s daughter, on the day that prosecutors announced that Officer Rialmo would not be charged.

Officer Rialmo said that he felt terrible for members of the Jones family and that he understood their anger toward him. But he chooses not to dwell on her death.

“I can’t really sit back and think about, ‘Wow, some innocent lady is dead because of me,’” Officer Rialmo said. “I can’t do that because it would just mess with my head, to be honest.”

He sued the estate of Mr. LeGrier, blaming the teenager for the emotional trauma that came with killing a bystander. He sued the city, contending that it had provided him inadequate training to handle Mr. LeGrier’s mental health issues. And he spoke openly about the “big relief” that came when prosecutors announced in February that he would not be charged.

Officer Rialmo’s career remains in limbo. Last summer, he was returned to patrol and spent months as part of a roving team in some of the city’s highest-crime neighborhoods. When higher-ups found out, he was put back behind a desk.

Though Officer Rialmo avoided criminal charges, prosecutors have shown a greater willingness in recent years to present police shooting cases to a jury.

In Ohio, Ray Tensing, a former University of Cincinnati police officer, is facing his second trial on murder and manslaughter charges in the death of Samuel DuBose, an unarmed black man whose death in 2015 was recorded by a body camera. The first trial last year ended with a hung jury.

In Minnesota, Officer Jeronimo Yanez faces a second-degree manslaughter charge in the death of Mr. Castile, whom he pulled over and fatally shot last summer in the suburb of Falcon Heights. Mr. Castile’s girlfriend streamed the aftermath on Facebook. In the courtroom on Monday, dashboard camera video and audio of the shooting were played publicly for the first time.

During both trials, prosecutors will frame the shootings as unnecessary and criminal. Defense lawyers will call the officers’ decisions reasonable and in line with their training.

“If we lose, I wouldn’t want to be a cop,” said Earl Gray, a lawyer for Officer Yanez.

In Oklahoma, days after her trial concluded, Officer Shelby went back to work. But she is not patrolling the streets of Tulsa anymore, and instead has been assigned a desk job.

“She’s alive, but her life passion is behind her,” said Ms. McMurray, her lawyer.

Officer Shelby tried to put a happier spin on the situation. She called her new duties an “important job,” and said she was relieved to have avoided prison.

But she said she continued to struggle with the weight of having a taken life. “I’m still grieving,” she said.