The push began in the Trump administration and continued under President Biden, and the Justice Department obtained a gag order to keep it from public view.
WASHINGTON — In the last weeks of the Trump administration and continuing under President Biden, the Justice Department fought a secret legal battle to obtain the email logs of four New York Times reporters in a hunt for their sources, a top lawyer for the newspaper said Friday night.
While the Trump administration never informed The Times about the effort, the Biden administration continued waging the fight this year, telling a handful of top Times executives about it but imposing a gag order to shield it from public view, said the lawyer, David McCraw, who called the move unprecedented.
The gag order prevented the executives from disclosing the government’s efforts to seize the records even to the executive editor, Dean Baquet, and other newsroom leaders.
Mr. McCraw said Friday that a federal court had lifted the order, which had been in effect since March 3, freeing him to reveal what had happened. The battle was over an ultimately unsuccessful effort by the Justice Department to seize email logs from Google, which operates The Times’s email system, and which had resisted the effort to obtain the information.
The disclosure came two days after the Biden Justice Department notified the four reporters that the Trump administration, hunting for their sources, had in 2020 secretly seized months of their phone records from early 2017. That notification followed similar disclosures in recent weeks about seizing communications records of reporters at The Washington Post and CNN.
Mr. Baquet condemned both the Trump and Biden administrations for their actions, portraying the effort as an assault on the First Amendment.
“Clearly, Google did the right thing, but it should never have come to this,” Mr. Baquet said. “The Justice Department relentlessly pursued the identity of sources for coverage that was clearly in the public interest in the final 15 days of the Trump administration. And the Biden administration continued to pursue it. As I said before, it profoundly undermines press freedom.”
There was no precedent, Mr. McCraw said, for the government to impose a gag order on New York Times personnel as part of a leak investigation. He also said the government had never before seized The Times’s phone records without advance notification of the effort.
A Google spokeswoman said that while it does not comment on specific cases, the company was “firmly committed to protecting our customers’ data and we have a long history of pushing to notify our customers about any legal requests.”
Anthony Coley, a Justice Department spokesman, noted that “on multiple occasions in recent months,” the Biden-era department had moved to delay enforcement of the order and it then “voluntarily moved to withdraw the order before any records were produced.”
He added: “The department strongly values a free and independent press, and is committed to upholding the First Amendment.”
Last month, Mr. Biden said he would not permit the Justice Department during his administration to seize communications logs that could reveal reporters’ sources, calling the practice “simply, simply wrong.” (Under the Obama administration, the Justice Department had gone after such data in several leak investigations.)
The letter this week disclosing the seizure of phone records involving the Times reporters — Matt Apuzzo, Adam Goldman, Eric Lichtblau and Michael S. Schmidt — had hinted at the existence of the separate fight over data that would show whom they had been in contact with over email.
The letters said the government had also acquired a court order to seize logs of their emails, but “no records were obtained,” providing no further details. But with the lifting of the gag order, Mr. McCraw said he had been freed to explain what had happened.
Prosecutors in the office of the United States attorney in Washington had obtained a sealed court order from a magistrate judge on Jan. 5 requiring Google to secretly turn over the information. But Google resisted, apparently demanding that The Times be told, as its contract with the company requires.
The Justice Department continued to press the request after the Biden administration took over, but in early March prosecutors relented and asked a judge to permit telling Mr. McCraw. But the disclosure to him came with a nondisclosure order preventing him from talking about it to other people.
Mr. McCraw said it was “stunning” to receive an email from Google telling him what was going on. At first, he said, he did not know who the prosecutor was, and because the matter was sealed, there were no court documents he could access about it.
The next day, Mr. McCraw said, he was told the name of the prosecutor — a career assistant United States attorney in Washington, Tejpal Chawla — and opened negotiations with him. Eventually, Mr. Chawla agreed to ask the judge to modify the gag order so Mr. McCraw could discuss the matter with The Times’s general counsel and the company’s outside lawyers, and then with two senior Times executives: A.G. Sulzberger, the publisher, and Meredith Kopit Levien, the chief executive.
“We made clear that we intended to go to court to challenge the order if it was not withdrawn,” Mr. McCraw said. Then, on June 2, he said, the Justice Department told him it would ask the court to quash the order to Google at the same time that it disclosed the earlier phone records seizure, which he had not known about.
He described the position he was in as “untenable,” especially when it came to talking with Times reporters about chatter involving some kind of fight involving Google and a leak investigation related to The Times.
The Justice Department has not said what leak it was investigating, but the identity of the four reporters who were targeted and the date range of the communications sought strongly suggested that it centered on classified information in an April 2017 article about how James B. Comey Jr., the former F.B.I. director, handled politically charged investigations during the 2016 presidential campaign.
The article included discussion of an email or memo by a Democratic operative that Russian hackers had stolen, but that was not among the tranche that intelligence officials say Russia provided to WikiLeaks for public disclosure as part of its hack-and-dump operation to manipulate the election.
The American government found out about the memo, which was said to express confidence that the attorney general at the time, Loretta Lynch, would not let an investigation into Hillary Clinton’s use of a private email server go too far. Mr. Comey was said to worry that if Ms. Lynch made and announced the decision not to charge Ms. Clinton, Russia would put out the memo to make it seem illegitimate, leading to his unorthodox decision to announce that the F.B.I. was recommending against charges in the matter.
The Justice Department under then-President Donald Trump, who fired Mr. Comey and considered him an enemy, sought for years to find evidence sufficient to charge him with the crime of making unauthorized disclosures of classified information — a push that eventually came to focus on whether he had anything to do with The Times’s learning about the existence of the document Russian hackers had stolen.
The long-running leak investigation into Mr. Comey was seen inside of the Justice Department as one of the most politicized and contentious, even by the standards of a department that had been prevailed upon in several instances to use leak investigations and other policies concerning book publication to attack former officials who criticized Mr. Trump.
Throughout last year, prosecutors talked about whether or not to close the leak investigation into Mr. Comey, according to two people familiar with the case, in part because there seemed to be little evidence to show that the former F.B.I. director had shared classified information with the press.
Last fall, department officials discussed whether the investigation had run its course and prosecutors should draft a declination memo that would explain why Mr. Comey would not be prosecuted, one of the people said. But the F.B.I. and the career prosecutors working on the case wanted to keep the investigation open, the people said, and in January prosecutors obtained a special court order to require Google to turn over data on the reporters’ emails.
With Mr. Trump soon to be out of office, the order was controversial among some inside of the department, according to two people with knowledge of the case. It was seen as unusually aggressive for a case that would likely end in no charges. During the transition from the Trump to the Biden administration, at least one official wrote in a memo that the case should be closed, according to a person familiar with the transition.
In the court filings seeking to compel Google to turn over logs of who was communicating with the four reporters who wrote that story, the Justice Department persuaded the judge that the secrecy was justified because, as the judge wrote on Jan. 5, “there is reason to believe that notification of the existence of this order will seriously jeopardize the ongoing investigation, including by giving targets an opportunity to destroy or tamper with evidence.”
The Jan. 5 document does not acknowledge that the existence of the leak investigation into Mr. Comey and its subject matter was by then already known, because The Times had reported on it almost a year earlier. It is not clear whether the Justice Department told the judge about that article, or instead suggested that the inquiry was still a well-kept secret.