Authorities are building a criminal case against Robert Durst’s wife for allegedly trying to help him flee to Cuba — and believe she could “put the final nail in his coffin” if she cuts a deal, The Post has learned.

The Los Angeles DA’s Office, which is prosecuting Durst for the 2000 shooting death of Susan Berman, is working with the FBI to investigate Debrah Lee Charatan, law-enforcement sources said.

A team of forensic examiners is poring over financial records looking for money transfers or other evidence, one source said.

Charatan — who married the millionaire murder defendant less than two weeks before Berman’s execution-style slaying — could face a federal charge of aiding and abetting a flight to avoid prosecution, sources said.

The crime carries up to five years in the slammer.

“The wife is definitely in play,” a source said. “If she’s smart, she’ll waive [spousal privilege] and tell investigators everything she knows and put the final nail in his coffin — and then she might escape prosecution.”

Sources have said Durst, 71, was preparing to fly to Cuba when he was busted March 14 in Berman’s cold-case killing, and that Charatan, 58, was either going to accompany him or meet him there.

Charatan, a New York City real-estate investor and property manager, was in Florida when Durst was nabbed by an FBI task force in New Orleans, after spending much of the previous week meeting with her lawyers, sources said.

“She knew this was coming and that [Durst] was going to be arrested and this was all going to blow up,” a source said.

Charatan refused to comment on Friday when she arrived at her swanky waterfront home in Bridgehampton, LI.

Meanwhile, Durst’s defense team on Friday moved to toss Louisiana gun charges tied to a loaded .38-caliber revolver that cops found following his March 14 arrest.

Durst maintains his LA arrest warrant was “invalid” because it was filed to coincide with Sunday’s climax of a six-part HBO documentary about him, during which he was heard whispering, “What the hell did I do? Killed them all, of course.”

New Orleans and LA prosecutors both declined to comment.

Additional reporting by Jennifer Gould Keil, Lia Eustachewich, Kenneth Garger and Bruce Golding