Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A longtime friend of Robert Durst testified Thursday that after a dinner in 2014, he asked the millionaire about the murder of their mutual close friend Susan Berman and got a disturbing answer.

"It was her or me," Durst said, according to ad executive Nick Chavin.

A year later, Durst, the subject of the HBO show "The Jinx," would be charged with the 2000 slaying of Berman, allegedly because she knew too much about his involvement in the 1982 disappearance of his first wife, Kathie.

Prosecutors called Chavin, 72, to the witness stand during a pretrial hearing to question him about damning statements that Durst allegedly made about both women throughout the years. A judge has not yet ruled whether a jury can hear the testimony when Durst's trial gets underway.

Chavin testified that after Kathie Durst went missing, Berman made a stunning claim: "Bob killed Kathie."

"I said, 'No he didn't,'" Chavin testified.

"She said, 'Yes, he did.'"

Chavin said he asked Berman how she knew, and she replied that "he told me" and that it was an accident.

He said Berman told him: "There's nothing anyone can do for Kathie and we have to protect him [Bob Durst] now."

Related: The Millionaire Drifter Who Can't Run From His Past

Chavin said that after Berman confided in him, he didn't press for further details and and "then we stopped talking about it." Chavin said he thought Kathie, who "had a bit of a drug problem," might have been killed by a dealer.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"I didn't really want to know," he said, explaining that he did not go to authorities because he could not believe Durst had harmed Kathie — that is, until Berman was found murdered almost 20 years later.

Real estate heir Robert Durst sits in a courtroom during a hearing Wednesday, Dec. 21, 2016, in Los Angeles, Calif. Jae C. Hong / AP

Chavin had talked to Berman a month before her death. "She was writing a very interesting and possibly dangerous work," he said. "She said it was very sensitive and secret."

After Berman, a mobster's daughter, was found shot to death at her Benedict Canyon home in December 2000, police contacted Chavin and he told the investigator what Berman had said about Durst killing Kathie.

"I began to doubt my own feelings [about Durst's innocence]," Chavin said. "Nobody else had reason to harm Susan Berman."

After Durst was arrested in Texas for the 2001 killing and dismemberment of his elderly neighbor, Morris Black, Chavin's concerns deepened.

He had doubted that Durst killed Kathie or Berman because he didn't believe he was "capable of hands-on violence of that extreme level," Chavin said. But after Black's gruesome end, "it was like taking the gloves off... all things are possible."

Robert Durst is transported from Orleans Parish Criminal District Court to the Orleans Parish Prison after his arraignment in New Orleans, Tuesday, March 17, 2015. Durst was rebooked on charges of being a convicted felon in possession of a firearm, and possession of a weapon with a controlled dangerous substance, a small amount of marijuana. (AP Photo/Gerald Herbert) Gerald Herbert / AP

Then, in 2014, Durst invited Chavin to dinner. He didn't say why, but Chavin had an idea.

"I believe that the only thing it could be about were the unanswered question about the disappearance of Kathie and the death of Susan Berman," Chavin said.

The subject didn't come up during the meal, however. It wasn't until they had left the restaurant and were on the sidewalk that Chavin reminded Durst that they had not talked about Berman.

"Bob said, 'I had to,'" Chavin recalled. "'It was her or me. I had no choice.'"

"It's fair to say I wasn't surprised," Chavin continued. "I was not shocked but my response was one of 'Now I know.'"

Chavin, who appeared upset, then added, "This is not easy."

Prosecutors kept Chavin's name under wraps before calling him to the stand for a hearing set up to collect early testimony from witnesses who were elderly or feared they could be harmed by Durst, even though he's serving a seven-year sentence on a gun possession charge.

Related: Durst Hearing Focuses on Mystery of 1982 Phone Call

The other witnesses who testified during the hearing were:

Dr. Albert Kuperman, who was the associate dean of the New York City medical school where Kathie Durst was a student when she vanished in 1982 after calling him to say she was too sick to come in. Questioning focused on whether Kuperman knew for sure that it was Kathie Durst on the other end of the line, which is significant because it could bolster or undermine her husband's account of her whereabouts before she went missing.

Susan Giordano, who worked for Chavin and befriended Durst in 2002 while he was jailed for Morris Black's death. She testified that they had a platonic relationship but talked about getting a "love nest" and that he gave her $350,000 in gifts and loans. Giordano was called to the stand because she had stored boxes full of Durst's personal papers — and allowed producers of the HBO program, "The Jinx," to go through them before they were seized by police in 2015.

The defense claims that the contents of the boxes were privileged and should not be used as evidence at Durst's trial, but prosecutors contend that Durst waived that privilege when he gave "The Jinx" producers access.

"The Jinx" examined Durst's ties to his wife's disappearance and Berman's death, as well as the 2001 death and dismemberment of Black. The series ended with Durst blurting out on a hot microphone that he "killed them all."

In an interesting footnote, Chavin testified that in 2014, Durst tried to talk him into participating in "The Jinx," but he demurred because it seemed like a "terrible idea."

"[Durst] didn't think they meant to do him any harm," Chavin said of the producers. "He got very, very, very upset at me for not doing it."