A rookie police officer pleaded not guilty Wednesday to manslaughter, official misconduct and other charges in the accidental shooting death of a man in a darkened stairwell of a Brooklyn public housing complex.

Officer Peter Liang appeared briefly in a Brooklyn courtroom packed with officers as the charges were unsealed. He also was charged with criminally negligent homicide and assault. He was released without bail.

The victim, 28-year-old Akai Gurley, was killed on Nov. 20 while visiting a public housing complex in Brooklyn's gritty East New York neighborhood to get his hair braided. Liang had less than two years on the job, including his time at the police academy.

He and his partner were patrolling the Louis Pink Houses, where reports of violent crime had spiked. The hallways were "pitch black," and Liang had his gun drawn as they descended onto an eighth-floor landing, police said after the shooting. Meanwhile, Gurley opened the door into the seventh-floor landing after giving up his wait for an elevator. Liang was about 10 feet from Gurley when, without a word and apparently by accident, he fired a shot, police said. Gurley made it down two flights of stairs before collapsing. He was taken to a hospital where he later died.

Brooklyn District Attorney Ken Thompson said he would convene a grand jury to investigate, and the results came back less than three months after the shooting, about the time it takes grand juries to consider other criminal cases.

Even before the shooting, the New York Police Department had been changing how it assigns and trains new officers. Under former Commissioner Raymond Kelly, the NYPD assigned rookie officers as reinforcements in parts of the city that have seen increases in crime. The Pink Houses had been the scene of a recent spike in shooting, robberies and assaults.

Under William Bratton, new officers are no longer funneled into high-crime precincts as extra manpower, but instead are assigned mentors who are more experienced officers and rotate through different jobs at precincts. Bratton has said the retooling process is taking time but is moving forward.

The case was closely watched following the Dec. 3 grand jury decision not to indict a police officer in the chokehold death of Eric Garner. That decision prompted mass protests decrying the grand jury system as biased, and fueled an already growing discord between the city's rank-and-file police and Mayor Bill de Blasio, who was viewed by critics as not publicly supporting police after the decision. On Wednesday, he said it was not wise to compare the cases. Garner was black, the officer involved was white. Gurley was black; Liang is Chinese-American.

"I think what matters is, at the end of at the end of the entire process, do people think there was a sense of fairness," he said.

The last time an officer was indicted in New York was 2012, when Richard Haste was charged with manslaughter in the shooting death of Ramarley Graham, but the case was tossed on a technicality and another grand jury declined to indict the officer. When police face criminal charges, the case is usually decided by a judge and not a jury, the defendant's choice. In 2007, three of five officers involved in the 50-shot death of Sean Bell were indicted on manslaughter charges but were acquitted by a judge. They were later fired.