A rookie police officer who fired into a darkened stairwell at a Brooklyn public housing complex, accidentally killing a man who had been waiting for an elevator, has been indicted in his death, a lawyer said Tuesday.

Officer Peter Liang will appear in court Wednesday in the shooting death of 28-year-old Akai Gurley, according to Scott Rynecki, an attorney representing Gurley's family. The charges against Liang weren't immediately clear.

Patrick J. Lynch, head of Liang's union, said he deserves due process.

"The fact that he was assigned to patrol one of the most dangerous housing projects in New York City must be considered among the circumstances of this tragic accident," Lynch said.

The indictment comes after mass protests and calls for reform of the grand jury system nationwide following a Staten Island grand jury's refusal to indict a police officer in the chokehold death of Eric Garner and a Missouri grand jury's decision not to indict an officer in the death of Michael Brown.

Rynecki said the shooting was unjustified, regardless of whether it was intentional.

"This is the first step for justice," he said.

Liang and his partner were patrolling the Louis Pink Houses, a public housing development in Brooklyn's gritty East New York neighborhood, on Nov. 20. The New York Police Department assigns rookie officers as reinforcements in parts of the city that have seen increases in crime. The housing project, where Gurley's friend lives, had been the scene of a recent shooting, robberies and assaults.

The officers had descended onto an eighth-floor landing when, 14 steps away, Gurley and the woman who had been braiding his hair opened a door into the seventh-floor landing after giving up their wait for the elevator so he could head to the lobby. The lights were burned out in the stairwell, leaving it "pitch black" and prompting both officers to use flashlights, police said after the shooting.

Liang, for reasons unclear, also had his gun drawn, police said. He was about 10 feet from Gurley when, without a word and apparently by accident, he fired a shot, police said.

Gurley was struck in the chest. The two made it down two flights of stairs after he was shot, but he collapsed on the fifth-floor landing and lost consciousness, according to the woman, Melissa Butler.

Gurley was taken to a nearby hospital, where he died, police said. Police officials pieced together the details of the shooting from radio reports and interviews with the girlfriend and the second officer, but they have not spoken to Liang and won't until after the criminal proceedings are completed. Liang was placed on desk duty after the shooting.

The shooting came at a time when the NYPD, the nation's biggest police department, is changing how rookie officers are used fresh out of the academy to give them more training and time with more senior officers. The shooting recalled a 2004 incident in which 19-year-old Timothy Stansbury was shot dead by a startled officer on a Brooklyn rooftop of a housing complex. His family got a $2 million settlement with the city.