Wyndham Lathem, left, and Andrew Warren on Aug. 19. (Chicago Police Department/AP)

On the day of the murder, former Northwestern University microbiology professor Wyndham Lathem rented a car and started driving west, away from his high-rise apartment in Chicago and the bloodied body of his 26-year-old boyfriend, Trenton James Cornell-Duranleau, who had been stabbed 70 times.

But before Lathem allegedly fled the city — before anyone called him a killer — the professor left an anonymous cash donation of $5,610 at a renowned Chicago health center for LGBTQ patients. Then 13 hours later, from about 80 miles northwest in Lake Geneva, Wis., he wrote a $1,000 check to the town’s public library.

Both donations were made in the name of his dead boyfriend, “Cornell-Duranleau.”

Eight days later, on Aug. 4, after an intense, nationwide manhunt, Lathem and a British national named Andrew Warren turned themselves in to police in California. The two were wanted for murder.

They have yet to enter a plea. But their alleged motive for the brutal stabbing of Cornell-Duranleau, a hairstylist who had just moved to Chicago from Michigan, remained a mystery.

Nearly a month since the July 27 killing, prosecutors revealed for the first time what they believe inspired the savage stabbing: sex fantasies plotted in an online chat room that ended in murder and suicide.

Assistant State’s Attorney Natosha Toller told a Cook County judge Sunday that Lathem, 42, and Warren, 56, a payroll assistant at Oxford University’s Somerville College, had communicated for months about “carrying out their sexual fantasies of killing others and then themselves.” It was the two men’s first appearance before a Chicago judge, who ordered them to stay in jail until their first-degree murder trials because they are dangerous and a flight risk, reported the Associated Press.

“The heinous facts speak for themselves,” Judge Adam Bourgeois Jr. said in court, reportedly shaking his head while Toller gave a chilling recap of their alleged actions.

Warren flew into Chicago’s O’Hare International Airport a few days before the fatal stabbing, the prosecutor said. Lathem had purchased the man’s plane ticket and also bought him a hotel room near his Chicago condo.

Cornell-Duranleau was sleeping inside that condo when Lathem let Warren inside at about 4:30 a.m. on July 27, prosecutors said. Lathem instructed Warren to record cellphone video of what would happen next, Toller said, though for some reason Warren never did.

Then Lathem sneaked up on Cornell-Duranleau and plunged a 6-inch drywall knife into the victim’s neck and chest. Cornell-Duranleau awoke, screaming and fighting back, the prosecutor said, so Warren ran over. He allegedly covered the victim’s mouth and hit him over the head with a lamp.

Lathem kept stabbing, Toller said, while Warren retrieved two kitchen knives. Then both started stabbing Cornell-Duranleau.

“Wyndham,” Toller said the victim’s final words were, “what are you doing?”

When it was all over, autopsy and police reports show that Cornell-Duranleau had been stabbed a total of 70 times, piercing his back, neck and chest. The wounds were so severe he was nearly decapitated, Toller said, and the knives had been plunged with such force that one broke.

The prosecutor said it was unclear why the men didn’t follow through with their plan to kill themselves after they allegedly killed Cornell-Duranleau. Originally, they had planned for Warren to shoot Lathem while Lathem stabbed Warren, prosecutors claim.

Instead, the men cleaned themselves up and fled the condo, renting a car together before beginning their apparent cross-country getaway road trip, prosecutors alleged.

Chicago police said at a news conference that Lathem placed an anonymous call from a public library in Wisconsin to the doorman at his condo building reporting that something may have happened in his unit. Authorities eventually discovered Cornell-Duranleau’s body inside the blood-covered apartment.

Lathem also sent a video to his family and friends on his way to California, apologizing for his “involvement” in the killing, police have previously said. According to Anthony Guglielmi, chief spokesman for the Chicago police, Lathem said in the video that he made “the biggest mistake of his life,” reported the Chicago Tribune.

At a news conference Sunday before the bond hearing, Chicago Police superintendent Eddie Johnson called the killing “unquestionably tragic.”

Prosecutors said that both men have admitted to the slaying, reported the Chicago Tribune.

At the Sunday court hearing, Lathem attorney, Barry Sheppard, gave the judge letters from the former professor’s friends and colleagues that touted his academic and research accomplishments.

“The court has read his professional and academic achievements,” the judge said, according to the Chicago Tribune. “Some of the finest in the world, right? It has nothing to do with this, though.”

The men have another hearing Tuesday, reported the Associated Press.

Lathem was fired from Northwestern University after the allegations, according to the Chicago Tribune. Warren was suspended from England’s Oxford University.

More from Morning Mix

Jerry Lewis telethons raised billions for muscular dystrophy. Many cheered when he went off the air

KKK leader threatens to ‘burn’ Latina journalist, the first black person on his property

Liberty University graduates return diplomas because of support for Trump by Jerry Falwell Jr.

Tales from the path of totality: 62 years ago today, they say, ‘little green men’ invaded this Kentucky farm town