Durst will take the stand in his murder trial to say he “panicked and ran” after seeing his friend’s body, his attorney said in a stunning revelation.

Alex Gallardo / AP Real estate heir Robert Durst during his murder trial in on Tuesday.

After almost 20 years of denials, Robert Durst’s attorney admitted for the first time Tuesday that Durst was at the crime scene following the murder of his best friend, Susan Berman, and he was the first to discover her body. “Bob showed up and found her dead,” famed Houston defense lawyer Dick DeGuerin told jurors in his opening statement at Durst’s trial in Los Angeles. “He panicked. He wrote the anonymous letter, so her body would be found, and he ran. He’s run away all his life.” And with that, Durst’s defense provided an alternative theory to the “gotcha” moment of the prosecution’s opening statement and the finale of the 2015 HBO documentary The Jinx. In the documentary, Durst denied writing the infamous “cadaver note” — the anonymous letter alerting police that Berman had been murdered — while the filmmakers confronted him with convincing written evidence that he had.

HBO The Jinx compared the cadaver note's handwriting with a letter that Durst had written.

In The Jinx, Durst himself said that the writer of the note had to be the killer. “Somebody has planned to do this. They had to go to her house and do what they did. And you’re taking this big risk,” Durst tells filmmaker Andrew Jarecki in the documentary’s final taped interview. “You’re writing a note to the police that only the killer could have written.” Yet three months before the trial was set to begin, Durst made a shocking admission in a court filing: He had written the “cadaver note” — but he maintained his innocence. On Tuesday, Durst’s defense team for the first time shared their case for how Durst could have written the note while not being the killer. DeGuerin also told a stunned courtroom that Durst will be testifying in his own defense at this trial.

Alex Gallardo / AP Defense attorney Dick DeGuerin makes his opening statements on Tuesday.

History has shown him to be a persuasive witness. He took the stand on his previous murder trial, for the 2001 killing of his neighbor Morris Black, and the jury found him not guilty. In that case — the first time DeGuerin represented him — Durst said he had acted in self-defense. That’s not a viable argument in this murder trial, however, since Berman was shot at close range, execution style, in the back of her head. Over the past few days, prosecutors have focused heavily on evidence that Durst had written the “cadaver note” — which, again, he’d already admitted to. Deputy District Attorney John Lewin also spent much of his lengthy opening statements reviewing a complicated timeline to show jurors how Durst was able to secretly travel from Northern California to Berman’s Beverly Hills home. Durst for years denied being in Los Angeles when Berman was killed in December 2000. But with Tuesday’s admission, whether or not he was able to make that trip will no longer be a key question for jurors to consider.

HBO Susan Berman and Robert Durst