The government and the news media have always had a complicated relationship, but under a president who routinely derides the media as “fake news” or the “enemy of the people,” that relationship has only become more fraught. Fortunately, despite all the saber rattling, overt legal action against the press by the current administration has yet to materialize — perhaps until now.

Revelations this week that federal prosecutors in a criminal investigation secretly seized years of email and phone records from a national security reporter — the first time that’s happened (as far as we know) under the Trump administration — indisputably raised the First Amendment stakes.

Details continue to trickle out, but here’s what we know. On Thursday night, the FBI arrested the recently retired security director for the Senate Intelligence Committee, James Wolfe. Federal prosecutors charged him with lying to investigators about his contacts with several reporters, including Ali Watkins, formerly with Buzzfeed and Politico, and now with The New York Times, with whom he had a romantic relationship.

The FBI appears to have been investigating the disclosure of classified information concerning Carter Page, a former Trump campaign aide suspected of potentially illegal dealings with Russian intelligence officials.

At some point, investigators seized several years’ worth of phone and email records from Watkins’ Verizon and Google accounts. Among other things, the records reveal intimate details about who Watkins communicated with and when — meaning investigators could potentially identify her confidential sources in their search to see if Wolfe had been one. Crucially, it’s unclear why the Justice Department felt the need to get Watkins’ data to build its case when it could have gathered evidence from Wolfe, as the security director for the Senate Intelligence Committee, much more easily.

That the government sought records from a reporter, any reporter, in this case is troubling. Internal guidelines at the Justice Department prohibit investigators from targeting a reporter unless they cannot get the relevant information from a non-media source and the information is truly essential to the case. For instance, prosecutors ultimately dropped a demand that New York Times investigative reporter James Risen testify in a case involving unauthorized disclosures about Iran’s weapons program because, the government ultimately found, the case could be made without forcing Risen to identify his sources.

Those principles — that journalists should be subject to investigation only when absolutely necessary — implicate both sound public policy concerns and the First Amendment. Journalism doesn’t work in a democracy if reporters can’t protect the identity of their sources. Anonymous sources are often the only way to report on sensitive national security stories like the Pentagon Papers, which detailed government lies to the American people in the lead-up to the Vietnam War, or the torture of secret detainees in the aftermath of the September 11 terrorist attacks. Protecting journalists’ ability to do their jobs without government interference ultimately protects the public’s right to information about what’s happening inside the government.

Absent a federal law — more on that in a second — the news media must rely on the Justice Department’s discretion. Law enforcement traditionally has recognized the essential role journalists play in a democracy, and, as noted, will only target journalists in investigations when other options have failed. Indeed, that discretion serves the interests of the government itself. Historically, every time the government has overreached in investigating members of the news media, authorities have had to contend with a rapid and dramatic backlash from the public and from lawmakers.

That’s exactly what happened with the Obama-era guidelines, which the Justice Department adopted to mollify critics after investigators used a dragnet subpoena to seize the phone records of almost 100 Associated Press reporters and labeled a Fox News journalist an unindicted co-conspirator in an Espionage Act case simply because he asked a source for information — something that reporters do every day. The same pushback may already be taking shape in this case. Rep. Jim Jordan, a Republican from Ohio on the House Government Oversight Committee, suggested Friday that he may try and hold hearings on the records seizure.

All of this boils down to one simple truth: journalists, now more than ever, need federal legal protections to ensure that the government can’t indiscriminately seize their confidential records or force them to disclose anonymous sources. Virtually all states have some form of such a “shield law” that protects journalists from being forced to reveal their communications with sources and other work product, but Congress has yet to act at the federal level. As the Watkins case may indicate that the Justice Department intends to draw journalists into investigations, democracy demands that Congress debate and pass such a law to ensure our free press remains free.

Gabe Rottman is the director of the Reporters Committee's Technology and Press Freedom Project.