Large mortgage lenders such as JPMorgan Chase (NYSE:JPM) and Citigroup (NYSE:C) are ramping up efforts to modify loan terms, in hopes of avoiding foreclosures and keeping homebuyers in their homes. However, Bank of America (NYSE:BAC) is running into a potential roadblock, as the complexity of securitization rears its head.

In a settlement relating to charges brought by state attorneys general against Countrywide Financial, which B of A acquired in July, the bank agreed to modify as many as 400,000 loans. B of A only owns about 12% of these loans; the rest are owned by mortgage-backed securities investors.

B of A did not consult with the investors in putting together the loan modification program. Instead, it's invoking its "delegated authority" to make the changes. Some investors are claiming that the bank is trying to shift the cost of its settlement onto them, and they're prepared to sue. Loan modifications to avoid foreclosures can benefit investors, but the devil is always in the details.

Unfortunately, even if B of A pushes through its loan modifications, it may only score a Pyrrhic victory.

Loan modifications are no silver bullet
Indeed, the experience of British bank HSBC (NYSE:HBC) -- which, like Citigroup, acquired a U.S. subprime lender (Household International, in 2003) -- shows that modifying loan terms is only moderately effective in avoiding foreclosures. And HSBC's case isn't unique; it's consistent with a housing bubble in which homebuyers were taking out loans that they could never come close to repaying. As a result, sorting this mess could be more complicated, and more painful, than bankers are anticipating.

Two banks that recently acquired notoriously careless mortgage lenders should be paying close attention to the B of A and HSBC case studies: Wells Fargo (NYSE:WFC) with Wachovia Bank (NYSE:WB), and JPMorgan Chase with Washington Mutual. Whatever happens to B of A might be knocking on their doors next.

Further foreclosure-free Foolishness: