At a time when President Trump regularly attacks the news media, the Department of Justice may be preparing to make it easier for the government to obtain journalists’ private communications data.

The public relies on both journalists and whistleblowers for vital information about our government’s most controversial activities. Weakening the current rules that protect reporters — as well as their sources — would undermine freedom of the press and endanger activities at the heart of the First Amendment.

This week, The Hill reported that DOJ has been working for months on potential revisions to its rules about when prosecutors can demand reporters’ phone records and other sensitive information like notes or emails. These records can reveal a journalist’s confidential sources, including the individuals who entrust journalists with information the public needs to know. The new report comes after statements by former Attorney General Jeff Sessions that, under his watch, DOJ was pursuing three times as many leak investigations as it did under the Obama administration — which itself set records for leak prosecutions.

The report comes the same week that President Trump’s nominee to be the next attorney general, William Barr, was asked at his Senate confirmation hearing whether “he would jail reporters for doing their jobs” — meaning reporters who would not disclose their sources to prosecutors. After a long pause, Barr refused to rule it out.

DOJ’s rules were last strengthened in 2013, in response to public outcry after it emerged that it had used subpoenas to obtain the phone records of 20 Associated Press reporters as part of one leak investigation, and had seized the emails and phone records of Fox News reporter James Rosen in another. Now, the department is apparently considering reversing course and rolling back at least two key protections.

First, the current rules require that the government exhaust all other reasonable investigative steps before seeking a journalist’s confidential information using a subpoena or search warrant. This requirement recognizes the heightened sensitivity of records related to newsgathering, as well as the fact that seizing these types of records has a broad chilling effect on the work of a free press, far beyond any single investigation.

Second, the rules establish a presumption that DOJ will provide advance notice to a media organization before relying on a subpoena or search warrant to seize records, unless the attorney general personally determines that an exception applies. Notice allows media organizations to challenge a subpoena in court, for example, or to discuss the scope of a subpoena with the government before sensitive records are seized en masse.

Investigators at DOJ have reportedly chafed at these requirements, arguing that honoring them makes leak investigations more resource-intensive and gives special treatment to journalists.

But these rules are not about special treatment — they exist to ensure that the free press guarantee of the First Amendment is a meaningful one. It should not be easy for the government to sift through journalists’ confidential sources precisely because of the damaging effects that would have on a robust and independent press.

The rules acknowledge the unique role that newsgathering plays in providing information to the public, including critical decisions by policymakers. Indeed, without such disclosures, the public would have never known about innumerable government activities that shouldn’t have been hidden in the first place, from the Pentagon Papers to illegal spying by the NSA.

Ultimately, the current complaints reflect a problem of DOJ’s own making. Leaks to reporters have always been a necessary element of healthy democratic debate in this country, yet under President Trump leak investigations have reached unprecedented heights. That is alarming enough. But the “stresses” this has placed on DOJ resources should not be a pretext for tearing down protections that are more important than ever.

The reality is that with the expansion of electronic communications, it has only gotten easier for DOJ to identify contacts with reporters, precisely because of the digital trail our communications leave behind. It has also gotten more dangerous for their contacts: Seizing all of a journalist’s phone records or email over a period of weeks or months is likely to expose even more confidential sources to scrutiny, even if those sources had no ties to the original investigation.

If anything, protections should be even stronger than they are, as the current rules do not go nearly far enough to safeguard both reporters and whistleblowers. Congress should pass a “reporter shield law” to close existing loopholes — and to prevent DOJ from seeking to jail reporters who are just doing their job when they refuse to disclose their sources.

Government leaks are often necessary so the public can hold its government accountable. Our democracy depends on assurances that confidential communications between journalists and their sources will be strongly protected.