Updated on April 19 at 4:30 p.m. EST

Former New York Police Department officer Peter Liang won’t spend a day in prison.

Liang, who was convicted in February of manslaughter and official misconduct in the shooting death of an unarmed black man in 2014, was sentenced Tuesday to five years of probation and community service after the judge in the case reduced his conviction from manslaughter to criminally negligent homicide moments before sentencing.

“I find that given the defendant’s background, and given how remorseful he is that it would not be necessary to incarcerate the defendant to have a just sentence in this case,” said Brooklyn Supreme Court Justice Danny Chun.

A New York jury had convicted Liang of manslaughter in February for killing Akai Gurley in a housing complex stairwell after Liang’s gun fired, ricocheted off a wall, and struck Gurley in the chest. Liang was the first NYPD officer in more than a decade convicted of an on-duty killing. Critics of the verdict said Liang had been offered up as an Asian scapegoat while for years white officers had done worse and gotten away with it.

Liang had entered the courtroom shortly after 2 p.m. Tuesday. Outside, protesters held signs calling him a “killer cop” and demanded the judge sentence him to prison time. Police tried to separate Liang supporters from a group of protesters who shouted that his conviction was unfair.

Before the judge read the sentence, the court listened to Gurley’s girlfriend, Melissa Butler.

“You took a piece of me,” she said to Liang, “you took a piece of my heart. Akai took his last breath and died in my hands. I’m suffering while you still have your life.”

When it was his turn to speak, Liang apologized to Butler, to Gurley’s family, and said he loved his family. “I’m not a man of many words,” Liang said. “The shot was an accident.”

Chun, the judge, said he reduced the manslaughter charge to negligent homicide because “as I watched the video of the defendant entering the lobby of the Pink Houses, I couldn’t help but feel he was entering with the serious mind of protecting the people.”

“Shooting somebody never entered his mind,” Chun said. “This was not an intentional act. This was an act of criminal negligence.”

During the trial, jurors repeatedly asked to touch Liang’s gun, even pulling the trigger for themselves; Liang, who never confronted Gurley, had said his finger accidentally jerked the trigger when he was surprised by a loud sound.

On the day of Gurley’s death in November 2014, Liang and his partner were patrolling the Louis H. Pink Houses in Brooklyn. They opened a door to an unlit stairwell on the eighth floor and Liang drew his gun. Liang said a loud noise surprised him and his gun accidentally fired. The bullet ricocheted and struck Gurley, who was walking down the stairs about a flight below with his girlfriend.

Liang later said he didn’t know anyone had been shot, so he and his partner, Shaun Landau, stepped outside into the hallway and debated who would call and tell their superior that the gun had been discharged. Meanwhile, Gurley had made it to the fifth floor and lay bleeding. It was only when Liang stepped back into the stairwell to find the bullet that he and his partner heard Gurley’s cries.

Liang had graduated from the police academy a year before. His partner would later testify that neither had received appropriate CPR training, and that officials running the police academy had even fed them answers on the exam. Gurley’s girlfriend, who had to run for neighbors to ask for a phone to call 911, performed CPR while an operator coached her. Liang was charged with official misconduct for not acting to save Gurley’s life. The other charges included second-degree manslaughter, criminally negligent homicide, second-degree assault, and reckless endangerment.

Liang faced 15 years in prison for the manslaughter charge, but there was little chance he’d receive such a sentence. In March, the Brooklyn district attorney’s office said it would not seek prison time for Liang, and instead asked he be sentenced to five years probation, with six months of home confinement. Of the recommendation, prosecutor Ken Thompson said that “from the beginning, this tragic case has always been about justice and not about revenge.”

It was not the news Gurley’s family wanted to hear. “We are outraged at District Attorney Thompson’s inadequate sentencing recommendation,” the family said in a statement responding to the office’s decision. “Officer Liang was convicted of manslaughter and should serve time in prison for his crime. This sentencing recommendation sends the message that police officers who kill people should not face serious consequences.”

After the judge read Liang’s sentence Tuesday, Gurley’s aunt, Hertencia Petersen, reportedly said, “Akai’s life does not matter. Black lives do not matter. But don’t worry, justice will be served one way or another."

Gurley’s death came just four months after the death of Eric Garner, another unarmed black man killed by police (though no one was  charged in that incident). The case followed a year in which police shootings of unarmed black men led to protests in cities across the United States––in Ferguson, Missouri, Baltimore, Maryland, Chicago, and New York.