Millionaire real-estate heir Robert Durst admitted he was “stupid” to participate in an HBO documentary that appeared to implicate him in the 2000 murder of his friend, according to new evidence.

In a recorded jail phone call played Friday in Los Angeles court, Durst told his pal Nathan Chavin that “The Jinx: The Life and Deaths of Robert Durst” is what landed him in prison in 2015.

Unknowingly wearing a live microphone during the documentary, Durst muttered, “What the hell did I do? Killed them all, of course.”

Shortly after the potentially damning confession aired, Durst was arrested in the years-old shooting death of his close friend Susan Berman in Los Angeles.

The kooky cross-dresser, 73, has also been long suspected of murdering his wife Kathie in 1982. Her body was never found.

Chavin took the stand this week as part of a hearing to record testimony from witnesses who are old or who fear for their safety, in case they’re not able to testify at Durst’s trial, which won’t begin before next year.

Chavin testified that he stonewalled authorities for seven months after Berman’s death. But he eventually told prosecutors Durst admitted to him in 2014, “I had to. It was her or me. I had no choice.”

On cross examination, Durst’s lawyers confronted Chavin with transcripts of him denying that Durst indicated he killed Berman, suggesting that Chavin made up the story.

The 72-year-old said he struggled to tell authorities about the alleged confession because of loyalty to his longtime friend Durst.

Durst allegedly confided to Berman that he had killed Kathie, Chavin testified a day earlier.

“Susan said to me, ‘Bob killed Kathie,’ ” Chavin recalled.

Our editors found this article on this site using Google and regenerated it for our readers.