It is not clear how prosecutors made that case, since the existence of the leak investigation and its subject matter — which appeared to focus on James B. Comey Jr., the former F.B.I. director, and a document Russian hackers had stolen — was already public knowledge; The Times had reported on it almost a year earlier. On Saturday, Mr. McCraw said The Times would petition the judge to unseal the filings that prosecutors made laying out arguments in support of the secret order.
During the transition to the Biden administration, at least one official wrote in a memo for the incoming Biden team that the Comey leak investigation that gave rise to the attempt to seize the reporters’ email records should be closed, according to a person familiar with the matter.
After Mr. Biden took office, the administration placed acting officials in key positions in the department while it waited for the president’s nominees to be confirmed by the Senate. John Carlin, a former Obama-era official, became the acting deputy attorney general, and Monty Wilkinson, a career official, became the acting attorney general.
Mr. Wilkinson and Mr. Carlin were still in those roles on March 3, when a career prosecutor handling the matter in the office of the United States attorney for the District of Columbia, Tejpal Chawla, agreed to Google’s demand that someone at The Times be told, in accordance with a contract the two companies agreed to when Google took over The Times’s email system.
Mr. Chawla asked the judge to modify the Jan. 5 order so that Mr. McCraw could be told about the fight, while also preventing him from telling anyone else. The department eventually agreed to further modifications permitting the company’s general counsel and outside lawyers to be told, along with two senior executives: A.G. Sulzberger, the publisher, and Meredith Kopit Levien, the chief executive.
But the department insisted that imposing a gag order on them as well was justified, so no one was permitted to tell the public or anyone in the Times newsroom, including its executive editor, Dean Baquet. In the meantime, Attorney General Merrick B. Garland took office on March 11, but the fight continued on his watch for nearly three more months.
The dispute ended on Wednesday, when the department told Mr. McCraw that it was asking a judge to quash the order to Google without having obtained the reporters’ data.