The widow of Kenneth Lay, the late chairman and CEO of Enron, has managed to beat back an attempt by the Internal Revenue Service to collect $3.9 million in taxes from his estate.

The U.S. Tax Court ruled Monday in the Lays’ favor in a case involving a set of transactions between Lay, his wife Linda, and his energy company as it began to founder and his successor, Jeffrey Skilling, suddenly resigned in August 2001. Lay had given up the CEO job in favor of Skilling and planned to take a job with another company, but the Enron board wanted to bring back Lay to manage the troubled company.

As part of the deal, he sold $10 million in annuities as part of a deal for him to put aside his retirement plans and once again take the job of CEO, under the stipulation that he would get back the annuities if he worked for at least another 4.25 years leading the company. However, Lay was forced to step down from the company when it filed for bankruptcy later that year.

The Lays claimed that the annuities were sold to Enron for no gain, but the IRS said they should have reported the $10 million as taxable income and paid taxes of $3.9 million, according to Bloomberg BusinessWeek. However, the Tax Court disagreed with the IRS’s position, and noted that the Lays and their estate did not receive any distributions or death benefit.

“In summary, Enron paid Mr. and Mrs. Lay $10 million in exchange for the annuity contracts,” wrote Judge Joseph Goeke. “Enron intended for the full amount of its payment to be consideration for the annuity contracts. The annuities transaction is well documented, and all actions of the parties to the transaction reflect that Enron purchased the annuity contracts for $10 million. The Lays properly reported the transaction on their 2001 tax return as a sale of their annuity contracts.”

Lay was convicted in May 2006 on 10 counts of securities fraud and conspiracy. He faced up to 30 years in prison, but he died while on vacation before he was sentenced. Even after death, Lay managed to come out ahead, even though his shareholders and former employees did not.