Former Enron CEO Jeffrey Skilling could soon see his prison sentence shortened by as many as ten years, under the terms of a proposed re-sentencing deal announced Wednesday by the Justice Department.

Skilling, who was originally sentenced to 24 years in jail for his role in the collapse of the Houston-based energy giant, could be freed as early as 2017. A federal judge must still approve the deal.

Under the terms of the agreement, Skilling would drop any further legal challenges to his 2006 conviction on 19 criminal counts, including bribery, fraud, and insider trading. According to the Justice Department, the deal would allow the government to finally pay out $40 million in seized assets to victims of Enron's fraud. Those payments had been held up because, though Skilling was in prison, his case was still active.

"Mr. Skilling will no longer be permitted to challenge his conviction for one of the most notorious frauds in American history, and victims of his crime will finally receive the more than $40 million in restitution they are owed," Justice Department spokesman Peter Carr said. "This agreement ensures that Mr. Skilling will be appropriately punished for his crimes and that victims will finally receive the restitution they deserve."

The terms of the deal would reduce Skilling's incarceration to between 14 and 17.5 years, according to the Associated Press. However, as CNBC points out, Skilling could see as much as four more years lopped off for good behavior and time served.

Skilling resigned from Enron in 2001, shortly before the company's shoddy business practices and dubious accounting tricks sent it spiraling into bankruptcy. Enron has long been synonymous with corporate malfeasance, and its demise in many ways foreshadowed the collapse of the financial industry in 2008.

He's been in prison since December 2006, but has been appealing his sentence for years. Appeals courts have repeatedly upheld his conviction, though the U.S. 5th Circuit Court of Appeals ruled in 2009 that his sentence — far longer than those handed out to other Enron executives — was too harsh, necessitating the new sentencing agreement.

"The agreement brings certainty and finality to a long painful process," Skilling's lawyer, Daniel Petrocelli, said. "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."

Some 5,000 employees lost their jobs, as well as millions of dollars in retirement savings overnight, when the company, once ranked seventh on the Fortune 500 list of top U.S. businesses, went under. Investors, meanwhile, lost nearly $60 billion when Enron stock suddenly became worthless.