The ban on record seizing may end a long dispute between the First Amendment protections of freedom of the press and the U.S. government’s efforts to keep classified information classified, the Associated Press reported. On top of crimes against children, the policy also exempts the ban in situations where journalists are suspected to be working with a foreign power or terrorist group.

Media advocates like Bruce Brown, executive director of the Reporters Committee for Freedom of the Press, praised Garland’s order.

“The attorney general has taken a necessary and momentous step to protect press freedom at a critical time,” Brown said. “This historic new policy will ensure that journalists can do their job of informing the public without fear of federal government intrusion into their relationships with confidential sources.”

For more reporting from the Associated Press, see below.

Garland was moved to act following an outcry over revelations that the department during the Trump administration had obtained records belonging to journalists at The Washington Post, CNN and The New York Times as part of investigations into who had disclosed government secrets related to the Russia investigation and other national security matters.

Others whose records were obtained were members of Congress and their staffers and former White House counsel Don McGahn

Garland’s announcement came after President Joe Biden said he would not allow the Justice Department to seize journalists’ phone records and emails, calling the practice “wrong.” Since then, Garland and other senior Justice Department staffers have met with representatives of news media organizations, with both sides agreeing on the need for new department policies. Garland has also said he would support federal legislation to add additional protections for journalists.

Leak investigations have long challenged department officials, resulting in policy changes in the last decade as well as pushback from media groups against government encroachment into their work.

President Barack Obama’s attorney general, Eric Holder, announced revised guidelines for leak investigations after an uproar over actions seen as aggressively intrusive into press freedom, including the secret seizure of phone records of Associated Press reporters and editors.

Jeff Sessions, President Donald Trump’s first attorney general, announced in 2017 a leak crackdown following a series of disclosures during the investigation into Russian election interference.