A decade after convicted tax lawyer Raymond "R.J." Ruble was booted from Sidley Austin, his exploits continue to haunt the firm.

Sidley was among several professional services firms called out by name Friday by Judge Thomas Wheeler of the U.S. Court of Federal Claims, who sharply denied a bid by BB&T Corp. to fend off $772 million in taxes and penalties related to a tax shelter known as STARS. Other banks are also battling the Internal Revenue Service over the STARS scheme, a shelter designed by Barclays plc and KPMG LLP and blessed and promoted by Ruble.

In Friday's decision, Wheeler wrote that the behavior of BB&T, Barclays, KPMG and the Sidley Austin professionals involved in the STARS transaction was "nothing short of reprehensible."

"Perhaps the business environment at the time was 'everyone else is doing it, why don't we?" Wheeler wrote. "Nevertheless, the professionals involved should have known better than to follow the STARS path, rife with its conflicts of interest, questionable pro forma legal and accounting opinions, and a taxpayer with a seemingly insatiable appetite for tax avoidance."

The STARS shelter, which was in effect for nearly five years from August 2002 through April 2007, was designed to generate large foreign tax credits for taxpayers in the U.S.—credits that could be used to raise revenue and lower taxes. While at Sidley, Ruble had worked with Barclays bankers to create and promote the STARS transaction. According to Friday's ruling, Barclays encouraged BB&T to hire Ruble and Sidley to provide two tax opinions on STARS, and BB&T ultimately paid Sidley $1.3 million for its advice.

Apparently that money wasn't very well spent. Wheeler concluded that the entire STARS arrangement was devoid of any economic substance other than tax avoidance. "The STARS transaction was no more than a circular redirection of cash flows from the U.S. Treasury to BB&T, Barclays, and the U.K. Treasury," the judge wrote.

BB&T said Friday that the bank expects to book a $250 million charge this quarter because of the ruling. "We are surprised and very disappointed with the court's ruling and continue to firmly believe that this was a legitimate financing transaction," BB&T CEO Kelly King said in a statement. "We will continue to review the decision and evaluate our legal options."

Rajiv Madan of Bingham McCutchen, who represented BB&T, didn't immediately respond to a call for comment.

Sidley partner Craig Chapman worked on the STARS deal and testified during BB&T's trial in the case. Chapman and two Sidley spokespeople didn't immediately respond to requests for comment.

Sidley Austin ousted Ruble in October 2003 due to irregularities in his practice. He was indicted in August 2005 and charged with tax evasion for "designing, implementing, and marketing fraudulent tax shelters" as part of a wide-ranging crackdown on tax dodges that also ensnared former Jenkens & Gilchrist partner Paul Daugerdas.

In December 2008, a jury found Ruble guilty on 10 counts of attempting to evade or defeat U.S. tax laws. He was sentenced to 78 months in prison and two years of supervised release in April 2009. According to federal prison records, Ruble is serving his sentence in the U.S. penitentiary in Lewis Run, Pa., with a projected release of September 2017.

According to Reuters, Wells Fargo and Santander Holdings also are challenging the IRS in separate disputes over STARS.