The white police officer who fatally shot the unarmed black teenager Ramarley Graham resigned on Sunday from the New York police department, to avoid being fired following a disciplinary trial in a case that sparked outrage over police use of deadly force against black men and boys.

Richard Haste was facing departmental charges for demonstrating “poor judgment”. He was accused of not taking obvious steps to defuse a fatal standoff that ended in the 2012 death of Graham inside the teen’s own bathroom, as his grandmother and little brother looked on in horror.

Graham’s mother, Constance Malcolm, said on Sunday that the city let Haste off the hook by allowing him to resign instead of being fired. She blasted the department for failing to schedule disciplinary proceedings for other officers involved.

“Every step of the way, the mayor and NYPD have dragged their heels and have refused to hold officers accountable for murdering my son,” she said. “How is my youngest son supposed to trust and believe in cops when he saw they murdered his brother in front of him and there is zero accountability?”

Administrative judge Rosemarie Maldonado found on Friday that Haste should be fired from the department.

Technically, Haste had time to go over the findings before they would be presented to the police commissioner, James O’Neill, who has the final say, but Haste resigned instead.

The commissioner had not yet officially ruled, but “has fully concurred with the findings and recommendations of the trial commissioner”, according to a statement from the department late on Sunday.

The Democratic mayor, Bill de Blasio, released a statement late on Sunday on Haste’s resignation.

“Ramarley Graham was a son, a friend and, most importantly, a young man with his whole life left to live,” De Blasio said. “Nothing can take away the profound pain left after his loss, but I hope the conclusion of this difficult process brings some measure of justice to those who loved him.”

De Blasio added that his administration had taken steps to strengthen the relationship between police and the community and increase transparency.

Haste initially faced a criminal manslaughter charge over the death, but the case was dismissed because of a procedural error. A new grand jury declined to indict, and federal prosecutors also declined to bring charges.

“He was exonerated by both a state and federal grand jury,” said Haste’s lawyer, Stuart London. “The New York City police department firearms discharge review board found the shooting to be justified. All of Officer Haste’s actions were performed in good faith. He never should have been forced to resign based on tactics alone.”

Graham’s shooting death in 2012 came before a spate of highly publicized killings by police, such as the deaths of Michael Brown, Walter Scott and Eric Garner, that helped propel the topic into the spotlight. But Graham’s family and friends have been a constant public presence over the past five years, demanding justice for the 18-year-old.

In his testimony during the departmental trial, Haste, now 35, recounted how he got out of his police van during a drug investigation in Graham’s Bronx neighborhood and followed the teenager, suspected on police radio chatter of having a gun, into his apartment building.

After Haste and his partner broke down the door of Graham’s home, the officer said he saw Graham sidestep into a bathroom, and he leaned inside to face him.

Haste testified that he yelled, “Show me your hands!” but Graham instead reached deeper into his pants and yelled obscenities.

“I thought I was about to be shot,” Haste said. “I expected to be dead.”

The family settled a wrongful death lawsuit against the city for $3.9m.