(Newser) – Facing 15 years in prison on a manslaughter conviction, NYPD officer Peter Liang will avoid jail, instead getting six months of house arrest and five years of probation, NPR reports. Liang, 28, was convicted of killing Akai Gurley in 2014 when he was startled by a noise while patrolling a housing project and fired into a darkened stairwell. The bullet ricocheted off a wall and hit Gurley. On Tuesday, Judge Danny Chun reduced Liang's sentence to criminally negligent homicide. “Given the defendant’s background and how remorseful he is, it would not be necessary to incarcerate the defendant to have a just sentence," the AP quotes Chun as saying.

The district attorney, who lobbied the judge to keep Liang out of prison, was upset by the switch to criminally negligent homicide and plans to appeal, the New York Daily News reports. The decision also angered Gurley's family—his aunt stormed out of the courtroom—and protesters outside. In addition to house arrest and probation, Liang, who says he hopes to rebuild his life, was sentenced to 800 hours of community service. (Read more police shooting stories.)

