It is unclear how long he spent at the hospital or why he was discharged. In New York, mental health services typically will not provide inpatient treatment for more than a few days unless it can be proved that patients present an immediate threat to themselves or other people.

Ms. Kearse said Mr. Bonds had been given diagnoses of schizophrenia and bipolar disorder and had been hospitalized on and off for years. When he was taking his medications, she said, he could be serene and almost never exhibited violent tendencies.

But if he stopped taking them or, worse, had a few drinks, he could go wild.

“Once he gets into that zone,” she said, “you can’t even medicate him and he becomes stronger than an ox.”

There is a family history of mental illness, she said. After Mr. Bonds’s father died of a heart attack when Mr. Bonds and his two siblings were still young, his mother, Deborah Kearse, had a breakdown and was institutionalized for a period. Mr. Bonds and his brother, John, were placed into foster care. His sister, Ryan, went to live with her aunt.

Deborah Kearse was placed in an assisted-living facility in Lower Manhattan. Since his release from prison, friends said, Mr. Bonds had spent time volunteering at the facility, making sandwiches for the residents and trying to forge a relationship with his mother.

Mr. Bonds’s trouble with the law began in adolescence.

In addition to low-level criminal activity, there were flashes of violence.

In 2001, when he was 18, he was with a group of four other people who attacked a police officer in Queens, a law enforcement official said, speaking on the condition of anonymity to describe the case, which has been sealed. Wearing brass knuckles, Mr. Bonds punched and kicked the officer, the official said.