A man who died in a Queens courthouse last week died by suicide, the city's medical examiner said Thursday.

The Office of Chief Medical Examiner ruled that Luis Alberto Lopez Castillo, 20, died by hanging.

The Department of Correction declined to comment on the ruling citing a pending investigation.

At the time of his death, the department said officers saw Lopez Castillo in medical distress at the Queens Criminal Court around 6:30 p.m. on Sept. 16. Staff gave him CPR until first responders arrived. He was taken to Jamaica Hospital, where he was pronounced dead just before 8 p.m.

That previous account did not say what caused Lopez Castillo's death, or where in the courthouse he was found.

Correction Commissioner Stanley Richards called the death "a heartbreaking moment for me and the entire department" in a statement last week. He said the DOC would investigate with city and state authorities.

Court records show Lopez Castillo had come to court for a scheduled hearing on robbery, grand larceny, assault and weapons charges from a July 2025 incident. He was also charged with murder in the killing of 26-year-old Ronell Marte. Authorities say Lopez Castillo and another man tried to rob Marte, who had special needs, at gunpoint in Starlight Park in the Bronx on September 2025.

"The idea that our criminal legal system produces so much despair should be chilling to all of us," Darren Mack, co-director of the Freedom Agenda, said in a statement Thursday. The nonprofit is an advocacy group that supports decarceration.

Mack said Lopez Castillo had spent a year at Rikers without his case being resolved.

"We are grieving with his family at this horrific confirmation," he said.

Lopez Castillo is at least the eighth person to die in city Department of Correction custody this year, according to the city comptroller's tracker which does not include this most recent death.