The House of Representatives passed legislation on Monday that restricts the federal government from forcing reporters to reveal their sources and other protected information, and imposes similar restrictions on coercing technology companies into helping the government spy on the press.

The Protect Reporters from Exploitative State Spying Act, or the PRESS Act, was introduced by Rep. Jamie Raskin, D-Md., and other House Democrats. But the bill acknowledges that government spying has taken place under both Republican and Democratic administrations, and it was easily approved by both parties in a voice vote late Monday night.

"Over the past several decades, Presidential administrations have attempted to crack down on classified leaks to media outlets," according to a report on the bill produced by the House Judiciary Committee. "These efforts have been conducted by both Republican and Democratic Presidents and have included efforts to obtain journalists' records, illustrating the need for stronger federal protections for journalists and their sources."

JUDGE ANDREW NAPOLITANO: UNLAWFUL FEDERAL SPYING ON JOURNALISTS IN PORTLAND SHOULD COST OFFICIALS THEIR JOBS

As examples, the reported noted that then-FBI Director Robert Mueller apologized to the New York Times and Washington Post for the "improper acquisition" of their reporters’ telephone records in 2004, under the George W. Bush administration. The records were acquired as part of an investigation into terrorism threats.

Jamie Raskin Jan. 6 committee

Rep. Jamie Raskin, D-Md., listens as the House select committee investigating the Jan. 6 attack on the U.S. Capitol holds its first public hearing to reveal the findings of a year-long investigation, on Capitol Hill, Thursday, June 9, 2022, in Washington.  (AP Photo/Andrew Harnik)

It also noted that the Obama administration’s Justice Department admitted to secretly collecting the records of 21 Associated Press phone lines used by dozens of reporters and editors as part of an effort to investigate the leak of U.S. efforts to foil a terrorist threat.

During a brief floor debate on the bill, Rep. Scott Fitzgerald, R-Wis., said the Obama administration had a much more aggressive stance toward the press than most.

"Administrations of both parties have unjustly targeted journalists, but none more so in recent years than the Obama administration," he said. "The Obama administration’s control on the flow of information has been described as the most aggressive since the Nixon administration."

FILE: U.S. President Donald Trump, left, shakes hands with former President Barack Obama, during the 58th presidential inauguration in Washington, D.C., U.S., on Friday, Jan. 20, 2017. Photographer: Pat Benic/Pool via Bloomberg

FILE: U.S. President Donald Trump, left, shakes hands with former President Barack Obama, during the 58th presidential inauguration in Washington, D.C., U.S., on Friday, Jan. 20, 2017. Photographer: Pat Benic/Pool via Bloomberg

In 2020, under the Trump administration, the Justice Department seized phone records from three Washington Post reporters who wrote about Russia’s alleged role in the 2016 election, a move that came to light in 2021.

FEDERAL COURT RULES BIG TECH HAS NO ‘FREEWHEELING FIRST AMENDMENT RIGHT TO CENSOR’

A battle over the phone records of four New York Times reporters that started under the Trump administration continued into the Biden administration. But in July 2021, Biden’s Justice Department formally adopted a policy that "restricts the use of compulsory process to obtain information from, or records of, members of the news media acting within the scope of newsgathering activities."

Department of Justice

Department of Justice, Washington, D.C. (iStock)

The bill passed by the House would codify guidelines for the government. Specifically, the bill establishes federal privilege that protects reporters from being compelled by the federal government to reveal confidential information and creates that same protection for technology companies that have access to that information.

CLICK HERE TO GET THE FOX NEWS APP

The bill does create exemptions to that privilege. For example, it allows the government to argue that the information is needed to counter an act of terrorism or other threat of imminent violence, and a court in the jurisdiction where the information is sought can authorize the collection of that information. But the bill says the court must give the reporter or technology company a chance to respond before it approves the government’s request.

Supporters of the bill say it’s needed because protections for reporters exist only at the state level and vary from state to state.