HOUSTON - Jeffrey Skilling's more-than-24-year prison sentence for his role in the collapse of the once-mighty energy giant Enron could be reduced by as much as 10 years if a federal judge approves an agreement reached Wednesday between prosecutors and defense attorneys.

Under the agreement, Skilling's original sentence will be reduced to between 14 and 171/2 years. The agreement has to be approved by U.S. District Judge Sim Lake, who is to hold a hearing June 21.

Daniel Petrocelli, Skilling's attorney, said the agreement "brings certainty and finality to a long, painful process."

Justice Department spokesman Peter Carr said the agreement would allow victims of Enron's collapse to finally receive more than $40 million in restitution. The ongoing status of the case has prevented the government from distributing Skilling's seized assets to victims, according to the agreement.

Skilling, who was Enron's chief executive officer, was convicted in 2006 on 19 counts of conspiracy, securities fraud, insider trading, and lying to auditors. The Houston company collapsed into bankruptcy in 2001 under the weight of years of illicit business deals and accounting tricks.

Skilling has been in prison since December 2006.

An appeals court in 2009 upheld his convictions but vacated his prison term and ordered that he be resentenced, saying a sentencing guideline was improperly applied, resulting in a longer term.

The U.S. Supreme Court said in 2010 that one of his convictions was flawed when it sharply curtailed the use of the "honest services" fraud law and told a lower court to decide whether he deserved a new trial. The lower court said he did not.

Skilling, 59, was the highest-ranking executive to be punished for Enron's downfall. Founder Kenneth Lay's similar convictions were vacated after he died of heart disease less than two months after trial.

Enron's collapse put more than 5,000 people out of work, wiped out more than $2 billion in employee pensions, and rendered worthless $60 billion in stock. Its aftershocks were felt across the city and the energy industry.