In her deposition, Ms. McFarland said that she believed her conversation with the Treasury propelled the government to change the terms of the bailout to seize Fannie’s and Freddie’s profits. “When the amendment went into place,” Ms. McFarland testified, “part of my reaction was they did that in response to my communication of our forecasts and the implication of those forecasts, that it was probably a desire not to allow capital to build up within the enterprises and not to allow the enterprises to recapitalize themselves.”

A spokeswoman for the Justice Department did not immediately respond to a request for comment.

The unsealing of the documents casts a spotlight on a legal proceeding that has been shrouded in secrecy from the start. The court granted the government’s request for confidential treatment of thousands of pages of materials produced in the case; Justice Department lawyers have asserted presidential privilege in 45 documents.

Last year, The New York Times filed an amicus curiae brief asking that the judge unseal two of the depositions in the case. She released excerpts from one of those depositions on Monday.

Further testimony unsealed on Monday came from Mario Ugoletti, a former Treasury official who was a former special adviser to the director of the Federal Housing Finance Agency, the conservator overseeing Fannie and Freddie. In December 2013, Mr. Ugoletti signed an affidavit for the case stating unequivocally that neither the Treasury nor the Federal Housing Finance Agency envisioned that the companies’ deferred tax assets were about to be reversed in the months leading up to the profit sweep, generating huge profits. He also said that the move was not intended to “increase compensation to Treasury.”

But in the deposition in May, Mr. Ugoletti said he did not know whether the Treasury or the Federal Housing Finance Agency officials knew about the potential for the profits at Fannie and Freddie at the time of the sweep.

Mr. Ugoletti, who left government in the fall could not be reached for comment.

A document produced by Grant Thornton, the accounting firm hired by the government to do financial analysis on the companies, casts additional doubt on the government’s contention that it considered Fannie and Freddie to be in a dire financial condition in 2012, when it changed the terms of the bailout. The document, unsealed on Monday, shows Freddie’s financial results through the first quarter of 2012 alongside handwritten notes from an unknown Grant Thornton employee. That employee noted how Freddie’s profits would require that it reverse the accounting entry, known as releasing the valuation allowance.