A federal judge has ruled that Richard Egan, the founder of storage technology company EMC, used illegal tax shelters to try to cheat the U.S. government out of $62 million in taxes after he was appointed U.S. Ambassador to Ireland.

Egan began using "Son of Boss" tax shelters in 2001 and 2002 to keep from paying over $327 million in capital gains taxes on his EMC stock, according to Bloomberg.com. After the IRS declared Son of Boss transactions to be illegal tax shelters, he and his wife sent $62.1 million to the IRS in 2005, but then filed suit to get the funds returned. A U.S. District Court judge in Boston ruled Monday that the IRS was entitled to the money.

The Egans claimed the transactions had been approved by four high-powered law firms and his tax returns prepared by KPMG, but the judge said the partnerships set up offshore for their family generated only paper losses. Egan died of a self-inflicted gunshot wound last August after suffering from lung cancer.

The IRS has been cracking down on tax shelters of different varieties in recent years, and the Son of Boss is one that has tripped up even Big Four accounting firms that used to sign off on the transactions and even helped market them to clients. In recent years, the IRS has been expanding its group of so-called “listed transactions,” making it harder for the wealthy to stash their funds offshore and keep them away from the reach of the U.S. Treasury.