NEW YORK ( TheStreet) -- Bank of America ( BAC - Get Report)has been ordered to unseal by January 8 certain documents it had sought to keep under wraps in a legal dispute with insurer MBIA ( MBI - Get Report), according to a decision Thursday by New York State Supreme Court Judge Eileen Bransten.

MBIA is suing Bank of America over mortgages placed into bonds it sold by Countrywide in the years leading up to the subprime mortgage crisis. MBIA insured the bonds, but wants Bank of America to assume liability for them because MBIA claims they contain false representations. Many analysts expect Bank of America to eventually settle the case for $2 billion to $3 billion, but the bank has been stalling, trying to run out the clock on cash-strapped MBIA.

The more than three year old case has provided countless pages of documents, including financial records, internal company emails, and testimony from senior Bank of America and Countrywide executives, including Bank of America CEO Brian Moynihan and former Countrywide CEO Angelo Mozilo. One massive trove of documents released Nov. 19 and 20 added up to more than 16,5000 pages, according to BTIG analyst Mark Palmer.

The documents at issue in Thursday's decision by Judge Bransten fall into 11 different categories, covering everything from witnesses' home addresses to Countrywide's current financial information, to capital contributions from Bank of America to Countrywide to non-public information concerning the amount of Countrywide's litigation costs and reserves. Bloomberg L.P. has joined MBIA in opposing Bank of America's motion to keep the documents out of public view.

Judge Bransten granted many of Bank of America's requests to keep documents under seal, but MBIA shares still gained 11.67% Friday. BTIG's Palmer, who is bullish on MBIA shares, sees the Judge's order as a positive for the bond insurer.

"We have said for some time that a settlement in the MBIA-Bank of America legal battle likely would not occur until BofA reaches the point at which it is experiencing real pain by not settling. The decision by Justice Bransten to unseal certain documents that BofA would prefer to remain private - including information about the structure of a prior BofA settlement, as well as details about the process through which it funneled capital to Countrywide - moves the bank a couple of steps closer to its pain threshold, in our view," Palmer wrote via email.

The analyst also argues oral arguments related to the question of whether Bank of America is liable for the actions of Countrywide, which it acquired in 2008 are "a potential inflection point in the case." Those arguments are set to begin on Jan. 9.

An MBIA spokesman declined to comment and spokespeople for Bank of America did not respond to a request for comment.

-- Written by Dan Freed in New York.

Disclosure: TheStreet's editorial policy prohibits staff editors, reporters and analysts from holding positions in any individual stocks.