CHICAGO (AP) — A British man accused in the fatal stabbing of a hair stylist in Chicago that a prosecutor said was driven by a sexual fantasy agreed Monday to plead guilty and testify against his co-defendant in the killing, a former Northwestern University professor, in exchange for a 45-year prison sentence.

Andrew Warren's written plea agreement comes almost two years after 26-year-old Trenton James Cornell-Duranleau's body was discovered July 27, 2017, riddled with stab wounds in an apartment in River North. Prosecutors later said he had been stabbed 70 times and with such brutality that he was nearly decapitated . His throat was slit and pulmonary artery torn.

The discovery prompted a nationwide manhunt for Warren and Wyndham Lathem, who lived in the apartment and was eventually identified as Cornell-Duranleau's boyfriend.

Lathem and Warren, who at that point worked at Oxford University, surrendered to authorities in California just days later.

Prosecutors spelled out how Warren and Lathem met in an online chatroom where they hatched a plot to kill Cornell-Duranleau and then themselves. Natosha Toller, an assistant Cook County state's attorney, described the plan as a sexual fantasy. But after they killed Lathem's lover, they lost their nerve and fled Chicago on a strange road trip to California that included a stop at a public library in which they made large donations in Cornell-Duranleau's name.

The two, who both pleaded not guilty to first-degree murder, are being held without bond in jail in Chicago. No trial date has been set for Lathem, once a respected associate professor of microbiology-immunology at Northwestern. He is scheduled to return to court next week.

About half a dozen relatives and supporters of Cornell-Duranleau attended the hearing for the 58-year-old Warren, but they left the courthouse without speaking to the media.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.