Sen. Ron Wyden, a longtime critic of government surveillance programs, proposed legislation Monday designed to protect journalists’ data from government subpoenas in the wake of recent admissions by the Justice Department that investigators seized reporters’ records hoping to identify sources.

The bill, called Protect Reporters from Excessive State Suppression (PRESS) Act, goes further than past efforts to create a federal shield law for reporters and safeguard their phone and email records, which are often held by third-party service providers.

Most states have some version of a shield law for reporters, but the federal government does not. Past efforts to pass such legislation have foundered in part over questions about how to define who is or isn’t a journalist, and what types of activity should be protected. State shield laws do not have to wrestle with the central issue in federal law about reporters’ sources — how to address investigations involving national security and classified information.

Calls for such a law increased in recent months after the Justice Department disclosed that it had seized phone or email records from reporters at The Washington Post, CNN and the New York Times as it sought to identify the sources for disclosures of classified information, angering First Amendment advocates who say such seizures have a chilling effect on a free press.

“The Trump Administration spied on reporters it suspected of no crimes in its hunt to identify their sources and prevent the American people from learning the truth about Trump’s lawlessness and corruption,” Wyden (D-Ore.) said in a statement. “As the son of an investigative journalist, I know reporters are essential to holding the government accountable, and shedding sunlight on the uncomfortable truths those in power seek to conceal. There need to be clear rules protecting reporters from government surveillance written into black-letter law.”

The seizures of journalists’ phone and email records were authorized in the waning days of the Trump administration, as law enforcement officials sought to identify the sources for reporting done in 2017. Initially, the Biden Justice Department defended the practice of using subpoenas to obtain reporters’ records in rare cases involving classified information, but after President Biden declared the practice “simply wrong,” the department said it would no longer seek information from reporters in the hunt for sources.

Earlier this month, Attorney General Merrick Garland ordered that new department rules be crafted to tighten when and how federal prosecutors and agents pursue cases involving reporters. Garland also met privately with executives from the three news organizations to discuss the issue.

A shield law from Congress would have more teeth than a Justice Department regulation, which can be changed or scrapped by any administration. But passing a federal shield law has proven difficult. The current Senate majority leader, Charles E. Schumer (D-N.Y.), sought to pass a federal shield law in 2013, the last time the Justice Department faced intense criticism for its pursuit of journalists’ records.

Wyden’s bill defines a journalist as anyone who “gathers, prepares, collects, photographs, records, writes, edits, reports, or publishes news or information that concerns local, national, or international events or other matters of public interest for dissemination to the public.”

His bill would shield journalists from court-ordered disclosures of information about their sources, but would make exceptions in cases where such information is necessary to prevent terrorism or identify a perpetrator of terrorism. It would also make an exception in cases where the information is deemed necessary to prevent imminent violence or death.

Gordon Smith, the president of the National Association of Broadcasters, praised Wyden’s effort “to ensure journalists have the ability to report the news without putting themselves or their sources at risk.”