NEW YORK (CBSNewYork/AP) — New York City has reached a settlement of more than $4 million with the family of an unarmed man fatally shot by a police officer in a darkened stairwell in November 2014, the attorney for the family said Tuesday.

The city is paying $4.1 million and the New York City Housing Authority is contributing $400,000 to settle a wrongful death lawsuit filed by the family of 28-year-old Akai Gurley.

The city’s Law Department called the settlement a “fair resolution of a tragic matter.”

Former Officer Peter Liang was on patrol when he opened a stairwell door at a public housing building and suddenly fired. The bullet ricocheted and hit Gurley.

Liang was sentenced to five years’ probation and 800 hours of community service; he later apologized to Gurley’s family saying, “I wish I could undo what happened.”

Family attorney Scott Rynecki said the parties reached the settlement “after extensive negotiations guided by Supreme Court Justice Dawn Jimenez-Salta.”

Liang will pay $25,000 to Kim Ballinger, the mother of Gurley’s daughter as part of the settlement. The money will be invested in annuities for the young girl.

“I’m glad we got a conviction, I’m glad my daughter will be taken care of, I’m glad it’s done,” Ballinger told reporters. “I look forward to raising our daughter to be a good person and a woman that he would be proud of.”

She said the 4-year-old girl misses her father. “Every day she asks for him, she asks can she see him, she asks can she go to heaven to him.”

The case became a flashpoint for police accountability. The shooting came just months after the deaths of Michael Brown in Missouri and Eric Garner on Staten Island prompted protests and a nationwide discussion of police killings.

Liang’s supporters said he has been made a scapegoat for past injustices. More than 10,000 of his backers rallied in New York and across the U.S. after the verdict, protesting his conviction.

Liang was a rookie patrolling a pitch-dark stairwell of the Pink Houses in East New York with his gun drawn while Gurley headed down to the lobby because the elevator was out of order. Liang said he was startled by a noise, fired accidentally and didn’t immediately realize his bullet had hit someone.

Both he and his partner said they felt unqualified to help Gurley as he lay bleeding on the stairwell floor. Gurley’s girlfriend gave him CPR as a neighbor yelled instructions from a 911 operator on the telephone.

A jury convicted him of manslaughter, but Brooklyn state Supreme Court Justice Danny Chun said prosecutors hadn’t proven key elements of that charge and reduced it to criminally negligent homicide, a lowest-level felony. He said there was no need for prison “to have a just sentence in this case.”

(TM and © Copyright 2016 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2016 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)