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

Robert Durst's lawyer on Friday attacked the credibility of a prosecution witness who delivered damaging testimony against "The Jinx" millionaire accused of killing his wife Kathie and his best friend Susan Berman.

During several grueling hours of cross-examination, defense attorney Dick DeGuerin suggested that advertising executive Nick Chavin had lied. He played a lengthy tape recording to cast doubt on Chavin's sworn statements and sparred with him over the difference between lying and not telling the truth.

"I'm a professional liar," Chavin said, seemingly in jest, on the stand. "I'm in advertising."

The stakes are high, especially if a judge allows a jury to hear what Chavin, a longtime friend of Durst, had to say on the witness stand earlier in the week during the pretrial hearing.

On Thursday, Chavin dropped a bombshell, testifying that after Kathie went missing in 1982, Berman told him Robert Durst had confessed to killing her.

Then Chavin testified that in 2014, Durst made an stunning and incriminating comment directly to him about Berman, who had been murdered years earlier.

"I had to," Durst said, according to Chavin. "It was her or me. I had no choice."

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

Durst — the scion of a real-estate family who became a household name after the HBO program "The Jinx" — is charged only with killing Berman in 2000, though prosecutors say he did it because he feared she would implicate him in Kathie's death.

Prosecutors called Chavin to the stand during a special hearing to collect testimony from witnesses who are elderly or frightened of Durst in case they are not available when his trial gets under way.

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

With his two armed guards watching, the 72-year-old advertising executive faced an intense cross-examination from defense lawyer DeGuerin, who questioned why he waited so long to reveal the alleged confession and why it took five to 10 conversations with prosecutor John Lewin before he told the full story.

"I was not ready to talk about it then," Chavin said.

"So you were lying?" DeGuerin pressed.

"I wouldn't call it lying," Chavin said, referencing it as "a coverup."

Lewin first learned about Durst's alleged confession from Chavin's wife. But when the prosecutor spoke to Chavin, he had a different story.

"Maybe she's lying," Chavin said to Lewin, according to a tape of their conversation played in court. "I can't explain it. Her memory is very shaky lately."

Chavin and DeGuerin sparred over whether he had, in fact, lied to the prosecutor. But Chavin insisted, "I just didn't want to tell the truth."

"Is there a difference between telling a lie and not telling the truth?" DeGuerin asked.

Chavin answered: "I think there is."

DeGuerin also focused on Chavin's close personal and business relationship with Douglas Durst, the younger brother of Robert who inherited the mantle of the family business and who has called the defendant "a psychopath."

He wielded a transcript of an April 2015 interview in which Chavin told the prosecutor that he needed Douglas Durst to trust him for business reasons.

"Douglas is scared to death of Bob and certainly wants to see Bob put away," Chavin told Lewin at that time.

"It could only help me," Chavin added.

The hearing will continue April 25 with four more witnesses, including one who, like Chavin, will remain secret until called to the stand.