A man authorities long suspected of a 1989 Dorchester homicide admitted to the killing in court Tuesday, exactly one year after a jury failed to convict him of murder for the crime.

Eugene Sutton, 48, pleaded guilty Tuesday to manslaughter in the fatal stabbing of 38-year-old Richard Gleason, of Cambridge, prosecutors said. He was sentenced to 19 to 20 years in prison, the maximum for the offense.

Sutton’s murder trial for Gleason’s death ended in a hung jury on Dec. 3, 2012, Suffolk District Attorney Daniel F. Conley’s office said in a statement.

Advertisement - Continue Reading Below

“Richard Gleason’s family has been waiting for this day for more than 24 years,” Conley said. “They never forgot or gave up hope that justice would be done in his name.”

Prosecutors say Sutton demanded money from Gleason then repeatedly attacked him and ultimately stabbed him to death in the kitchen of a School Street apartment on May 16, 1989.

Jury selection for Sutton’s retrial on the murder charge was scheduled to begin Wednesday before the prosecution and defense agreed on a plea deal.

“We believe the evidence put him at the scene but there were no eyewitnesses to the actual attack,” said Jake Wark, a spokesman for Conley’s office. “The manslaughter plea ensures an unequivocal admission of guilt and a 20-year prison sentence.”

Michael Doolin, Sutton’s attorney, called the deal “a very fair offer.”

Phone numbers for members of Gleason’s family could not be located Tuesday night.

Sutton was originally suspected of the crime, but for two decades investigators could not produce enough evidence to definitively link him to Gleason’s death, Conley’s office said.

Detectives reopened the case in 2009 and discovered Sutton’s DNA in a bloodstain on Gleason’s jacket, eventually leading to a 2011 grand jury indictment, the district attorney’s office said.

“Today, thanks to a new generation of police and prosecutors with a new generation’s scientific tools, we were able to secure an unequivocal admission of guilt from his killer,” Conley said.

Sutton was incarcerated for a felony drug charge prior to the murder indictment and has been in custody since, Wark said.