The exterior of the Justice Department in Washington. (Mark Wilson/Getty Images)

THE SEIZURE of phone and email records from a reporter for the New York Times, Ali Watkins, raises serious questions. In the previous administration, Justice Department guidelines were published to guard against overreach and investigative tactics that could put a chill on newsgathering. The guidelines sought to strike a balance between a society’s need for a free press and its need to keep some information secret. What’s worrisome about the latest episode is that it could signal an aggressive campaign by the Trump administration to upend that balance and squelch the vital communication between reporters and their sources.

According to the Times, Ms. Watkins was notified Feb. 13 that the Justice Department had seized years of records for two of her email accounts and a phone number. The investigators did not obtain the content of the messages but did obtain metadata, including from earlier years when she worked for BuzzFeed News and then Politico, before joining the Times last December. The records were apparently sought in connection with an investigation that led to the indictment last week of James Wolfe, a former director of security for the Senate Select Committee on Intelligence, who was accused of lying to the FBI about his contacts with four reporters. One of them was Ms. Watkins, with whom he had had a romantic relationship until December. Mr. Wolfe pleaded not guilty to the charges Wednesday.

Under Justice guidelines, hammered out between 2013 and 2015, the government should use subpoena power, court orders or search warrants for journalists’ records only as extraordinary measures, not as normal investigatory tools, and, except in unusual circumstances, the government should give reporters advance notice of a bid for records, to allow sufficient time for a protest or negotiation. This is not giving journalists absolute protection from such requests but erecting some limits to allow them to communicate with confidential sources. In light of the guidelines, was the broad sweep for Ms. Watkins’s communications really necessary? Or is the Justice Department using a vacuum-cleaner approach? Was she given advance notice or told after the fact?

Our concern is grounded in part in the administration’s own statements. Attorney General Jeff Sessions announced last August that the department was pursuing about three times as many leak investigations as were open at the end of the Obama years, and he said the FBI had created a new counterintelligence unit for such cases. President Barack Obama was more active than all his predecessors in launching leak investigations. President Trump, meanwhile, blasts away at “fake” news every chance he gets — and on Wednesday he called news organizations such as NBC and CNN “the country’s biggest enemy.”

Mr. Trump’s antipathy aside, leaks are a legitimate and vital channel for a democracy, and they are not always illegal or about classified material. They can expose dissent, alert against error or reveal folly. By the same token, secrets are a vital tool in governing, especially in diplomacy, intelligence and law enforcement. A rules-based system of keeping secrets must function properly and be respected. The nation needs both, in balance.