A prisoner in Upstate New York has been charged with fatally stabbing a man eight years ago in an apartment in Southeast Washington’s Anacostia neighborhood, according to police and court records.

Investigators matched DNA retrieved from the crime scene to the inmate, identified as Jackie Raiquan Berry, 28, who at the time of the killing lived in Southeast Washington but later moved to Niagara Falls, N.Y., authorities said.

New York prison records show that Berry is serving a four-year sentence at Cape Vincent Correctional Facility near the Canadian border for a weapons conviction. He was in D.C. Superior Court on Wednesday and ordered detained.

Berry is charged with second-degree murder while armed in the May 27, 2010, killing of Michael Geoffrey McKoy, 38, of Southeast. Police said he was found stabbed about 2:30 p.m. in the living room of his third-floor apartment in the 1600 block of V Street SE. Authorities said McKoy had been killed days before his body was found.

An arrest affidavit says police had entered the results of DNA testing into a nationwide computer database, and it was matched to the suspect, whose genetic material was collected upon his conviction in New York in 2015. Police did not disclose a possible motive.