Pat Sullivan, Associated Press
In this Aug. 15, 2014 file photo, New York City real estate heir Robert Durst leaves a Houston courtroom.

NEW ORLEANS — The arrest of Robert Durst, a wealthy eccentric linked to two killings and his wife's disappearance, came just before the finale in an HBO show about his life in which he said he "killed them all."

In the finale that aired Sunday evening on HBO, Durst was asked about similarities in handwriting in a letter he wrote and another linked to one of the killings. Later, filmmakers said Durst wore his microphone into the bathroom.

What followed was a bizarre rambling in which Durst said, apparently to himself, "There it is. You're caught" and "What the hell did I do? Killed them all of course."

The show ended, and it wasn't clear whether producers confronted Durst about the secretly recorded words, or what Durst meant by them.

Durst was arrested by FBI agents Saturday at a New Orleans hotel, on a warrant from Los Angeles for the murder of Susan Berman 15 years ago.