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

Real-estate heir Robert Durst pleaded guilty Wednesday to a federal gun charge in New Orleans, paving the way for extradition to California to stand trial for the 2000 murder of a confidante.

"It was a good result," Assistant U.S. Attorney Mike McMahon said of the plea deal, which calls for an 85-month sentence on the gun rap.

Durst, 72, looked frail, stooped and sickly as he shuffled into the courtroom with a chain draped around his waist. He wore an orange jumpsuit, tennis shoes, and and black prison-issued aviator-style eyeglasses.

"I plead guilty," Durst told the court.

Under the agreement, Durst will likely be sentenced before April and then moved to a federal prison near Los Angeles by mid-August. There, he will serve the gun sentence while awaiting trial in the death of writer Susan Berman.

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

Durst denies killing Berman, a Las Vegas mobster's daughter who was so close to him that he walked her down the aisle at her wedding.

"Bob Durst did not kill Susan Berman. He doesn't know who did and he wants to prove it," Durst's defense lawyer, Dick DeGuerin, said after the plea hearing.

Prosecutors believe that Berman, 54, was executed because she knew something about the disappearance of Durst's wife, Kathleen, who went missing in 1982 and is presumed dead.

Durst has been locked up in Louisiana without bail since March when FBI agents, acting on the murder warrant out of Los Angeles, nabbed him with a .38-caliber Smith & Wesson that was illegal for him to have as a convicted felon. They also seized $161,000 in cash and marijuana.

"In my opinion, he was on his way to Cuba," McMahon said.

Real estate heir Robert Durst appears in a New York criminal courtroom on December 10, 2014. MIKE SEGAR / Reuters

DeGuerin maintains the search of Durst's hotel room was illegal, but said he negotiated a plea because he wanted to "clear the decks" and get to California to clear his name.

His arrest in New Orleans coincided with the airing of HBO's documentary series, "The Jinx," which explored his links to his wife's disappearance, Berman's murder and the 2003 dismemberment of a neighbor in Texas.

During the show, Durst was confronted with two handwriting samples — an anonymous letter that had been sent to police alerted them to a "cadaver" at Berman's house and another letter he sent to Berman — that appeared to be a match and had identical misspellings of Beverly Hills.

Afterward, he blurted into a hot microphone: "There it is. You’re caught,” and “What the hell did I do? Killed them all, of course.”

It's unclear whether any of the material from "The Jinx" will play a role in the Los Angeles murder trial. No trial date has been set, and asked when one might start, one of Durst's attorneys, Chip Lewis, said, "Your guess is as good as mine."

During Wednesday's hearing, Durst at times appeared confused and hard of hearing as he answered the judge's questions. He told the court he takes "a whole slew" of medication each day for an undisclosed condition.