Bank of America's headquarters in Charlotte, North Carolina. Image source: iStock/Thinkstock.

Bank of America (BAC 3.61%) got a rare dose of positive legal news on Monday after a federal appeals court reversed a $1.27 billion lower-court judgment against the nation's second biggest bank by assets.

The case dates to Bank of America's purchase of Countrywide Financial in 2008. Prior to the acquisition, Countrywide sold billions of dollars' worth of subprime mortgages to Fannie Mae and Freddie Mac that were marketed instead as prime loans. A jury in 2013 held Bank of America liable for fraud, resulting in the $1.27 billion legal judgment. This was despite the fact that the program had ended by the time the bank purchased Countrywide.

The ruling on Monday by the U.S. Court of Appeals for the Second Circuit reversed the lower court's judgment. The appeals court based its holding on a lack of evidence that Countrywide intended to defraud Fannie Mae and Freddie Mac -- intent being a necessary element of fraud. The net result is that Bank of America can presumably reduce its legal reserves by more than $1 billion.

This isn't the first piece of good legal news that Bank of America has received over the past few years. Most importantly, a ruling last year from a New York state judge time-barred $7.6 billion of unresolved legal claims against the bank and reduced the quarterly inflow of new claims (known as representations and warranties claims) from more than $2 billion a quarter down to $200 million.

But these victories aside, Bank of America has spent tens of billions of dollars settling lawsuits and paying judgments and attorneys since the financial crisis. The bank noted at its annual investors' day last month that its total legal tab since 2010 has added up to $65 billion, split between $37 billion in litigation expenses and $28 billion in provisions to cover representations and warranties claims.

It's hard at this point to know what impact today's ruling will have on Bank of America's profits. That said, assuming the North Carolina-based bank had previously set aside money to cover the lower court's judgment, then it isn't unreasonable to think that the reversal of the $1.27 billion award could eventually find its way to Bank of America's bottom line.

Whether it does or does not, however, there's no question that this is good news to the bank and its shareholders, who have pined for the day that oppressive legal costs are a thing of the past. Every victory on this front moves Bank of America closer to its goal of returning to the upper echelons of banking by generating a double-digit return on equity.