Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Former New York Police Department (NYPD) Officer Peter Liang was spared jail time Tuesday for fatally shooting Akai Gurley in a Brooklyn housing project, a sentence that drew anger from Gurley’s friends and family who packed the courtroom.

Justice Danny Chun of the State Supreme Court in Brooklyn ordered Liang, 28, to serve five years probation and 800 hours of community service. Liang will also serve three years probation concurrently on misconduct charges.

Brooklyn District Attorney Ken Thompson had originally recommended five years probation along with six months of home confinement and 500 hours of community service.

Robert Brown, one of Liang’s attorneys, told NBC News it could take around five months for Liang to complete his community service.

Chun also reduced Liang's second-degree manslaughter charge to criminally negligent homicide, meaning Liang failed to perceive the risk that his actions would lead to Gurley’s death. For reckless manslaughter, Liang faced up to 15 years in prison.

"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," Chun said Tuesday.

Melissa Butler, who was with Gurley the night he was killed, and Kim Ballinger, Gurley’s domestic partner and mother of his daughter, addressed the court before Chun handed down his sentence.

Melissa Butler, Akai Gurley's girlfriend, reads a statement in court during the sentencing of former police officer Peter Liang in New York, Tuesday, April 19, 2016. Liang, convicted in the accidental shooting death of an unarmed man, Akai Gurley, in a darkened stairwell was spared prison time Tuesday, and a judge reduced his manslaughter conviction to a lesser charge. Jesse Ward / AP

“Peter Liang, I want you to know that when you stole Akai’s life you stole mine as well,” Butler said, facing the judge and reading from a sheet of paper.

Butler was in the unlit stairwell of the Louis H. Pink Houses with Gurley when Liang, who was on patrol, accidentally fired a shot that ricocheted off a wall and hit Gurley.

“Akai took his last breath and died in my hands,” Butler said.

Ballinger spoke next. “[Akai] was a great father to our child, Akaila,” she said. “He would get Akaila from school, play with her all the time. Every day Akaila asks, ‘Why was her dad killed by a police officer? What did he do?’”

Akai Gurley's daughter Akaila reacts on her mother Kimberly Ballinger's lap as reverend Al Sharpton speaks at the National Action Network in the Harlem borough of New York November 22, 2014. CARLO ALLEGRI / Reuters

Before the judge announced his sentence, Liang also gave a statement, at one point turning around to apologize to Butler and the Gurley family. “Judge, my life is forever changed,” he said. “I hope you give me a chance to rebuild it.”

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

In a statement following the sentencing, Thompson disagreed with Chun's decision to reduce the charges. "While our sentencing recommendation was fair under the unique circumstances of this case, we respectfully disagree with the judge’s decision to reduce the jury’s verdict and will fight to reverse it on appeal," Thompson said.

Statement from Brooklyn DA Ken Thompson on #PeterLiang sentencing, charge reduction: pic.twitter.com/zcjEvbkRU7 — Traci Lee (@traciglee) April 19, 2016

Upon exiting the courtroom, Hertencia Petersen, Gurley's aunt, said, "Akai's life does not matter. Black lives do not matter. But don't worry: justice will be served one way or another."

Sylvia Palmer, Gurley’s mother, didn’t speak with reporters after the sentencing but did issue a statement. “Judge Chun’s sentencing decision today is an insult to the life of Akai Gurley, to me as his mother, to all families whose loved ones have been killed by police, and all New Yorkers,” she said.

Outside the courthouse, supporters of Gurley and of Liang gathered to respond to the news. NYPD barricades were set up to pen in protesters along Jay Street while dozens of officers stood watch.

"To the extent that there's no jail time and no home confinement, we feel that the pressure is off," Doug Lee, a Liang supporter, told NBC News. Lee added that he still believes Liang was selectively prosecuted.

Peter Liang exits the courtroom where State Supreme Court Justice Danny Chun denied Liang's request for a new trial, Thursday, April 14, 2016. Chris Fuchs / NBC News

On Nov. 20, 2014, Liang was beginning a vertical patrol with his partner, former NYPD Officer Shaun Landau, on the eighth floor of an unlit stairwell at the Louis H. Pink Houses in Brooklyn when, Liang testified, he was startled and accidentally fired a shot. The bullet ricocheted off a wall and struck 28-year-old Gurley, who had entered with his friend Melissa Butler from the floor below.

Prosecutors said Liang’s actions were reckless and that he did not step in to perform CPR on Gurley, who lay dying on the fifth-floor landing. Liang’s attorneys argued he was in a state of shock after the shooting and was inadequately trained in the life-saving procedure, an allegation raised at trial that resulted in the NYPD placing a police academy CPR instructor on modified duty last month.

Thompson, in his March 23 statement, called the shooting unintentional and said putting Liang in prison was not necessary for protecting the public. A day after the announcement, Liang met with Gurley’s domestic partner and mother of his child, Kimberly Ballinger, to apologize.

Last week, Chun refused to grant Liang a new trial on the grounds that a juror allegedly lied during jury selection about his father’s manslaughter conviction and failed to disclose Facebook posts critical of police. Liang’s attorneys Paul Shechtman and Gabriel J. Chin argued that the juror, 62-year-old Michael Vargas, did so to secure a spot on the jury.

RELATED: Peter Liang Manslaughter Verdict Stands: Judge Denies Motion for New Trial

Tuesday’s sentencing capped a nearly year-and-a-half long case, and a three-week trial, that raised questions about police training and accountability, as well as the role race has played in securing indictments of officers accused of fatally injuring unarmed black men. The case also exposed a schism in how Asian Americans in general, and Chinese Americans in particular, have rationalized Liang's prosecution and conviction.

Judge Danny Chun reads the backs the charges against police officer Peter Liang in the shooting death of Akai Gurley, Thursday, Feb. 11, 2016 at Brooklyn Supreme court in New York in New York. Mary Altaffer / AP

Some in the community believe the Chinese-American rookie officer was sacrificed for white officers not indicted in other police-involved incidents, including the 2014 death of Eric Garner, who was placed in a hold around his neck, and Michael Brown, who was shot in Ferguson, Missouri. They also say Liang’s actions were not reckless, as prosecutors have argued, and that he should have never been indicted at all since the shooting was accidental.

Before Liang, the last NYPD officer convicted in a fatal civilian shooting was in 2005. Bryan Conroy was sentenced to probation and 500 hours of community service for killing an African immigrant during a police raid.

A year before that, a grand jury declined to indict NYPD Officer Richard S. Neri Jr., who shot and killed 19-year-old Timothy Stansbury Jr. while patrolling the roof of a Brooklyn housing project. Neri told the grand jury that he fired unintentionally and that he was startled when Stansbury opened the rooftop door.

Other Asian Americans have been vocal in calling for Liang's prosecution. Members of CAAAV Organizing Asian Communities, a group founded in 1986 to address police and hate violence toward Asian immigrants, believe that Gurley's death spotlights a larger, systemic problem of police officers not being held accountable in civilian deaths. They also maintain that Liang’s conviction was just.

Demonstrators protest outside the Brooklyn Supreme Courthouse in the Brooklyn borough of New York May 14, 2015. Demonstrators protested outside a pre-trial hearing for New York City Police officer (NYPD) Peter Liang, for the fatal shooting of Akai Gurley, in Brooklyn in 2014. STEPHANIE KEITH / Reuters

CAAAV along with Asian Americans United, Philadelphia; Chinatown Community for Equitable Development, Los Angeles; and Chinese Progressive Association, San Francisco and Boston issued a joint statement Tuesday evening, criticizing Liang’s sentence as an “insult” to Gurley, his family and victims of police violence.

“Nothing will bring Akai back, but we must hold all police officers accountable to continue to fight for violence-free communities and win change in our systems and institutions,” the statement read.

RELATED: Liang Sentencing Prompts #APIs4BlackLives, #Justice4Liang Responses

While counterexamples exist on both sides, the split in thinking, some say, is partly the result of generational differences among Chinese Americans, with older immigrants tending to support Liang and younger members of the community, many of them having grown up in the U.S., calling for Liang’s prosecution.

It wasn’t immediately clear if Liang’s supporters would hold nationwide rallies this weekend as they did back on Feb. 20, a week after his conviction. Tens of thousands of demonstrators, many of them Chinese Americans, turned out to those protests in at least 30 cities across the country.

Protesters support former New York Police Officer Peter Liang outside a Brooklyn courthouse before his sentencing for manslaughter in the killing of Akai Gurley, in New York April 19, 2016. Joseph Ax / Reuters

Brown, Liang’s attorney, said he believes the 40,000 letters from the public that they submitted to the judge asking for leniency helped with Liang’s sentence.

“I wish that he would have thrown the verdict out completely,” Brown added. “But a reduction from manslaughter to criminally negligent homicide I think was the next best thing.”

Brown said they are still planning to appeal Liang’s conviction and Chun’s refusal to grant a retrial based on juror misconduct allegations. In the meantime, Liang still faces two civil lawsuits. Ballinger, Gurley's domestic partner, announced in May that she was suing Liang, Landau and the city for Gurley's wrongful death. Butler, who was with Gurley the night he died, also filed suit against the city and Liang in February.

Follow NBC Asian America on Facebook, Twitter, Instagram, and Tumblr.