Photograph by Colin Robertson at The Truth About Mortgage

A New York state judge handed Bank of America (NYSE: BAC) its second major legal victory since the beginning of the year.

Justice Saliann Scarpulla ruled this week that the nation's second largest bank by assets can go forward with an $8.5 billion settlement it reached with institutional investors including Blackrock (NYSE: BLK) and MetLife (NYSE: MET) in June of 2011.

American International Group (NYSE: AIG) had challenged the deal, which was approved in January by a former colleague of Justice Scarpulla's, on the grounds that it didn't adequately compensate investors for losses sustained from mortgage-backed securities issued by Countrywide Financial, which Bank of America acquired on the eve of the financial crisis.

The insurance giant's arguments, however, were dismissed by the court.

Proponents of the deal have speculated AIG was using the proceedings simply to gain leverage in a related securities fraud case it's litigating against Bank of America in California. "The court should not permit AIG to nullify the judgment and hold the entire settlement hostage indefinitely," supporters argued.

For its part, AIG adamantly opposed this characterization, arguing in an official filing that the previous judge "repeatedly refused to give any weight to Petitioners' claims that AIG was merely leveraging its objection to benefit its separate securities fraud claim, and Petitioners presented no such evidence at the hearing."

Either way, for the time being at least, the $8.5 billion settlement appears to be well on its way to consummation.

The news should further lift the cloud of legal uncertainty from Bank of America's stock, leaving only a handful of securities fraud actions pending in California as well as a future settlement with the government akin to JPMorgan Chase's 2013 deal with various federal agencies.

The absolute best big back stock
Many investors are terrified about investing in big banking stocks after the crash, but the sector has one notable stand-out. In a sea of mismanaged and dangerous peers, it rises above as "The Only Big Bank Built to Last." You can uncover the top pick that Warren Buffett loves in The Motley Fool's new report. It's free, so click here to access it now.

John Maxfield owns shares of Bank of America. The Motley Fool recommends American International Group, Bank of America, and BlackRock. The Motley Fool owns shares of American International Group and Bank of America and has the following options: long January 2016 $30 calls on American International Group. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.