The allegation, made in a letter sent to a New York state judge on Friday, is the latest legal volley over a proposed $8.5 billion settlement that would help the bank, No. 2 in the United States by assets, resolve investor claims from its 2008 purchase of subprime lender Countrywide Financial.

The letter was written by attorneys for the Federal Home Loan Banks of Boston, Indianapolis and Chicago and for Triaxx funds. They are part of a group that has objected to the proposed settlement. The letter says the trustee who negotiated the pact, the Bank of New York Mellon Corp, should investigate the group's claims.

If the settlement receives court approval, it would help Bank of America put to bed one more claim stemming from its disastrous Countrywide acquisition. If it doesn't, the bank could face an even higher legal tab.

The letter also accused Bank of America of self-dealing in connection with the loan modifications, saying it modified first mortgages, which were owned by investors, but left home equity loans owned by Bank of America intact.

"Modifying mortgages for homeowners in severe distress is critical to the ongoing economic recovery and is encouraged by government at all levels," Bank of America spokesman Lawrence Grayson said in response to the letter. "It is difficult to see how federally regulated entities like the Federal Home Loan banks would seek to attack that practice, which helps families to stay in their homes and in no way violated the contracts at issue."

In one example cited in Friday's letter, a loan was reduced to $243,703 from $639,581, resulting in a more than $400,000 loss to a 2006 trust, while Countrywide's $82,850 second lien on the property was not modified.

"A short sale or foreclosure would have been a much better strategy than loan modification," according to the letter. Recent activity suggests the property is worth between $550,000 and $650,000, it said.

Grayson denied the bank engaged in self-dealing or put the bank's interests above those of investors. Grayson said the three loans cited as examples in the letter had their second lien loans modified.

Under the proposed settlement, Bank of America would pay $8.5 billion to settle claims that its Countrywide unit sold low-quality mortgage-backed securities that went bad when the housing boom collapsed.

The proposed settlement, announced in June 2011, was negotiated by Bank of New York Mellon as trustee for 530 residential mortgage-securitization trusts, with an estimated $174 billion of unpaid principal.

Twenty-two institutional investors, including BlackRock Inc, MetLife Inc and Allianz SE's Pacific Investment Management Co, reached the $8.5 billion settlement.

Kathy Patrick, of the law firm Gibbs & Bruns, who represents the 22 institutional investors, said the issues raised in the letter date back to 2009 and were considered fully at the time of the settlement. "That Triaxx seeks to resurrect this issue more than three years later says more about its litigation tactics than it does about the settlement," Patrick said.

Justice Barbara Kapnick of New York State Supreme Court in Manhattan must decide whether to approve the deal.

A hearing is scheduled in the case for Thursday.

(Reporting By Karen Freifeld in New York and Rick Rothacker in Charlotte; Editing byn Steve Orlofsky)

By Karen Freifeld and Rick Rothacker