Enron convict Jeffrey Skilling has reached a deal to be released early from prison, according to court documents filed Wednesday.

Skilling was sentenced to 24 years in prison for his role in the Enron debacle. Under the deal, he could shave nearly a decade off the 15 years remaining on his prison term.

The former Enron chief executive, now known as inmate #29296-179 at the Englewood federal prison in Littleton, Colo., was convicted for fraud, conspiracy, insider trading and lying to auditors in the largest corporate fraud in history.

"The agreement brings certainty and finality to a long painful process," said Skilling lawyer Daniel Petrocelli of O'Melveny & Myers. "Although the recommended sentence for Jeff would still be more than double any other Enron defendant, all of whom have long been out of prison, Jeff would at least have the chance of getting back a meaningful part of his life."

Related: Lawyers collect $700 million cleaning up Madoff's mess

As part of the agreement with the government, filed in federal court in Texas, Skilling has agreed to drop any further legal challenges to his conviction.

"Today's agreement will put an end to the legal battles surrounding this case," said Justice Department spokesman David Carr. "This agreement ensures that Mr. Skilling will be appropriately punished for his crimes and that victims will finally receive the restitution they deserve."

Carr said the victims will receive $40 million in restitution as part of the agreement.

More than 4,000 Enron employees lost their jobs, and many also lost their life savings, when the Texas-based energy company declared bankruptcy in 2001. Investors lost billions of dollars.