A federal judge ruled yesterday that Long Term Capital Management, the giant investment fund that nearly imploded in 1998 and received a $3.6 billion Wall Street bailout, used sham transactions to avoid about $40 million in taxes.

The judge ruled that the Internal Revenue Service can collect the taxes plus penalties and interest that could bring the total to about $75 million, handing the Justice Department a significant victory in its effort to combat what it views as abusive tax shelters.

More than a year after hearing testimony in the highly complex case, Judge Janet Bond Arterton of U.S. District Court in Connecticut ruled that a series of coordinated transactions Long Term Capital used to claim about $106 million in tax deductions in 1997 existed only on paper and had no real economic value. She said the IRS was correct to reject the deductions.

Long Term Capital Management, founded by well-known bond trader John W. Merriwether and Nobel Prize-winning economists Myron S. Scholes and Robert C. Merton, had filed suit against the IRS in 2001, arguing that the transactions, which resulted in Long Term Capital selling stock and deducting 100 times its value, caused real economic losses and entitled the fund to the $106 million in tax deductions.

Arterton rejected Long Term Capital's claim and upheld an IRS demand that the fund, which is now defunct, also pay a penalty.

In assessing the penalty, the judge referred to the way the company prepared part of its tax return as "its apparent steps to conceal" some of its reported losses and "thereby potentially win the audit lottery and evade IRS detection."

Tax shelter experts had closely watched the case for a signal from the court about the legality of the types of transactions used by Long Term Capital.

The case was also viewed as a high-profile test of the government's ability to battle the high-priced lawyers, accountants and bankers that companies often use to defend highly technical tax strategies.

While the case was underway, experts said the government would not "win" unless the deduction was rejected and penalties were imposed. Without penalties in such cases, they said, there is little reason for companies not to go to great lengths to minimize their taxes.

Charles P. Hurley, the IRS lawyer who led the government's case and is now in private practice in the District, said in an interview that the decision could discourage companies from engaging in transactions that appear to create losses on paper but otherwise have no real value.

"It's just one decision," he said. "But I think it's a decision that a lot of people were paying attention to and has the potential to influence people on both sides of the fence" on the issue of tax shelters. David Curtin, the lawyer who represented Long Term Capital in the case, did not return a call for comment on the decision, which was issued late Friday afternoon.

Staff writer Albert B. Crenshaw contributed to this report.