An ex-Oxford University employee has pleaded guilty to stabbing and killing a man in Chicago.

According to a plea agreement released this week, Andrew Warren, 58, attacked Trenton Cornell, 26, in 2017 while he was sleeping. Mr Cornell was found with more than 40 stab wounds.

Warren, formerly a senior treasury assistant at Somerville College, was charged with six counts of murder. He pleaded guilty to the first count; the remaining counts were dismissed. He has now agreed to give evidence against Wyndham Lathem, his co-defendant, who pleaded not guilty to the six counts both were charged with. In exchange, he will be given a 45-year prison sentence.

Mr Lathem was fired from his job as a microbiology professor at Northwestern University in Illinois after Mr Cornell’s body was found. Warren was also dismissed from Somerville.

Police say Mr Lathem was in a personal relationship with Cornell, a hair stylist, at the time of the murder.

Newly-released court documents allege that Warren and Mr Lathem began communicating online in the month before the murder. Warren then flew to the US to meet Mr Lathem.

Shortly after he arrived, Warren visited Mr Lathem’s apartment, where the former described his plan to murder Cornell. Assistant state attorney Craig Engebretson told the court Monday that Warren agreed to film the attack.

The murder happened just after, in Mr Lathem’s bedroom, where Cornell was sleeping. Cornell died from multiple stab wounds.

Warren eventually handed himself in while in San Francisco. Mr Lathem did the same in Oakland.