A Swindon man accused of the fatal stabbing of a hairstylist in Chicago was engaging in a sexual fantasy discussed for months in an online chatroom, a US court has heard.

The Illinois prosecutor alleged that Andrew Warren, 46, a University of Oxford employee whose online profile lists his home town as Swindon, joined former Northwestern University microbiology professor Wyndham Lathem, 56, in stabbing their victim 70 times.

Trenton James Cornell-Duranleau, the 26-year-old boyfriend of Lathem, was found with injuries so severe following the July 27 attack that he was nearly decapitated, his throat slit and his pulmonary artery torn.

Warren, who has been suspended from his job as senior treasury assistant at Somerville College, spoke only briefly during the hearing on Sunday in Chicago. When asked whether he wanted the British diplomatic office to be in contact, he said: “No.”

Natosha Toller, an assistant Cook County state’s Attorney, told the court that Lathem and Warren communicated for months before the attack about “carrying out their sexual fantasies of killing others and then themselves”.

Lathem paid for Warren to travel to Chicago’s O’Hare International Airport days before the killing, then booked him a room near his apartment the night before the attack, said the prosecutor.

At 4.30am on July 27, as Mr Cornell-Duranleau slept, Lathem let Warren into his 10th-floor flat. After moving quietly to avoid waking the victim, Lathem began stabbing Mr Cornell-Duranleau in the chest and neck with a 6-inch drywall saw knife while Warren watched from the doorway, the prosecutor said.

When the victim awoke, he started screaming and attempting to fight Lathem off. Warren then ran towards the victim and covered his mouth, before striking him in the head with a heavy lamp to silence him, the prosecutor said.

Lathem continued to stab the victim, while Warren left the room and returned with two kitchen knives. Warren leant over Mr Cornell-Duranleau and joined Lathem in stabbing him, the prosecutor said.

The victim bit Warren’s hand as he struggled against the attack, she said.

The prosecutor said that Mr Cornell-Duranleau’s last words were addressed to Lathem: “Wyndham, what are you doing?”

Following the attack, Lathem and Warren showered before leaving the apartment around an hour after the stabbing began, the prosecutor said.

An eight-day manhunt followed, before they both surrendered to Californian authorities on August 4 and were returned to Illinois.

Judge Adam Bourgeois said of the case that “the heinous facts speak for themselves”.

He deemed both suspects potentially dangerous. Warren and Lathem were both denied bail, and will remain in jail on first-degree murder charges.

Both men will have the opportunity to enter pleas at a later hearing.