NEW YORK CITY — Stanley Richards has been appointed commissioner of the New York City Department of Correction, becoming the first formerly incarcerated person to hold the post. Richards previously served as the agency's first formerly incarcerated first deputy commissioner, a role he assumed five years ago, and before that was the first formerly incarcerated member of the New York City Board of Correction.

Richards takes over an agency operating under court oversight. A federal judge ruled that conditions at the Rikers Island jails are unconstitutional and appointed former C.I.A. officer Nicholas Deml as remediation manager with authority over staffing and operations at the complex. Two people have died this year in Rikers detention facilities.

"It's going to be a partnership," Richards said of his relationship with the court-appointed remediation manager. Speaking about his trajectory from incarceration to the commissioner's office, he said, "My total experience has prepared me for this moment."

The Rikers Island complex incarcerates approximately 6,700 people, most in pretrial detention and others serving terms of less than a year. In the 1980s and 1990s, the 413-acre complex housed about three times as many people as it does now. Under a 2019 law, the jail complex must close by 2027, with a deadline established before Richards took office. The first borough-based jail, on Atlantic Avenue in Brooklyn, is scheduled for completion in 2029.

Richards spent decades as a leader at the Fortune Society, a nonprofit dedicated to supporting people returning from prison and developing alternatives to incarceration. He prefers to refer to jail residents as "people in our care." A corrections staffer told a reporter that the current terminology used inside the agency is PIC, which stands for "person in custody."

Richards was first arrested in 1976 at age fifteen. His mother had died when he was ten, and he became involved in drugs during his childhood. In the late 1980s, he was serving a prison sentence for armed robbery. During his four and a half years in prison, he completed an associate's degree in social science and ran a pre-release center to help others prepare for life outside. After his release, he applied for jobs at nonprofits focused on prisoner reentry but was told he lacked the necessary experience.

"Formerly incarcerated people were pariahs," said Vincent Schiraldi, a former corrections commissioner under Mayor Bill de Blasio. Selwyn Fergus, who serves as senior adviser to the commissioner, met Richards when they were both third graders in the Bronx.

"This appointment, I hope, gives others hope and faith that things and life could be different," Richards said. He said he intended to maintain a visible presence inside the facilities: "I'm going to be touring. I'm going to be around."