NEW YORK (Reuters) - A New York City police officer was convicted of manslaughter on Thursday for fatally shooting an unarmed black man in a darkened public housing stairwell.

A jury in Brooklyn found Peter Liang guilty in connection with the death of Akai Gurley, 28, who was killed by a bullet fired from Liang’s gun on Nov. 20, 2014, that ricocheted off a wall.

A stunned Liang buried his head in his hands after the verdict was read in court.

He faces up to 15 years in prison when he is sentenced in April. The mostly white jury deliberated for more than two days.

The shooting added to nationwide protests in cities like Baltimore and Ferguson, Missouri, over the use of police force against minorities, though Liang, a Chinese-American, was not accused of deliberately killing Gurley.

The rookie officer was on patrol inside a Brooklyn public housing project with his partner and drew his gun upon entering a pitch-black stairwell.

He fired a single bullet that glanced off a wall and into the chest of Gurley, who was walking one floor below.

At trial, Liang, 28, testified that a sudden noise startled him, causing his finger to slip onto the trigger and fire. It was only after descending the stairs, Liang said, that he realized the errant bullet had hit Gurley.

“Oh my God, someone’s hit,” a tearful Liang recalled saying upon finding a bleeding Gurley lying on a landing, as his girlfriend frantically tried to revive him.

Slideshow ( 5 images )

But prosecutors argued Liang fired toward the sound deliberately and that he must have known only another person could have caused the noise that surprised him.

“It was a tragedy, but justice was done,” Brooklyn District Attorney Kenneth Thompson told the television station NY1. He added that the verdict showed Akai Gurley’s life mattered, echoing the “Black Lives Matter” movement.

A defense lawyer for Liang, Robert Brown, said he would appeal and warned that the verdict would put officers in danger.

“It says to the NYPD, you have to be very cautious about taking your gun out, to the point of risking your own life,” he said.

Gurley’s family and friends expressed gratitude after the conviction.

“I’m just glad we got a guilty verdict,” said Kimberly Ballinger, his domestic partner and the mother of his young daughter.

Activists cheered the outcome on social media, with many saying it was an important step in holding officers accountable. Organizers had already called for a demonstration on Friday at police headquarters regardless of the jury’s decision.

Liang’s indictment last year came weeks after a grand jury declined to charge a white New York officer in the chokehold death of Eric Garner, an unarmed black man, sparking citywide protests.

Slideshow ( 5 images )

Thompson said the Liang case had no connection to the ongoing debate over police tactics.

“This officer was indicted not because of what is happening elsewhere in the country but because of what happened in that stairwell,” he said. “This conviction is not a conviction of the entire NYPD.”

But Patrick Lynch, the president of the city’s largest police union, said the verdict “will have a chilling effect on police officers across the city because it criminalizes a tragic accident.”

Liang was also convicted of official misconduct for failing to offer Gurley aid. His lawyers argued he was in shock and felt unqualified to perform CPR due to inadequate training.

As the trial concluded on Tuesday, prosecutors offered jurors a new and more damning account, claiming for the first time that Liang aimed a shot on purpose toward the sound he heard.

“I think it’s clear to you that he knew someone was there,” Assistant District Attorney Joseph Alexis said in his closing argument, adding that the shooting was “no accident.”

Brown, the defense lawyer, said the jury may have been swayed when the prosecution “changed their entire argument.”

Liang’s lawyers had portrayed the shooting as a “million-to-one” occurrence. They also emphasized the dangers of so-called “vertical patrols,” a point that was underscored when two officers were shot this month when conducting a similar patrol in a Bronx public housing building.

In a statement, Mayor Bill de Blasio said he hoped the verdict would bring some closure to Gurley’s family.