The U.S. NSA has halted a form of surveillance that allowed it to collect without a warrant the digital communications of Americans that mentioned a foreign intelligence target, the spy agency confirmed on Friday, Reuters reports.

Via Reuters:

The decision to stop the once-secret activity, which collected messages sent to or received from people believed to be living overseas, arrives as a sudden and unexpected triumph for privacy advocates who were long critical of the program, which U.S. officials had defended as both lawful and important to national security.

The halt is among the most substantial changes to U.S. surveillance policy in years and comes as issues of digital privacy remain contentious across the globe following the 2013 disclosures of broad NSA spying activity by former intelligence contractor Edward Snowden.

“NSA will no longer collect certain internet communications that merely mention a foreign intelligence target,” the agency said in a statement. “Instead, NSA will limit such collection to internet communications that are sent directly to or from a foreign target.”

TRENDING: RUTH BADER GINSBURG DEAD! Supreme Court Justice Dies at Home Surrounded by Family

NSA also said it would delete the “vast majority” of internet data collected under the surveillance program “to further protect the privacy of U.S. person communications.”