In what is being called a “sudden and unexpected triumph” for privacy advocates, the U.S. National Security Agency on Friday announced that it will no longer collect without a warrant the digital communications of Americans who are mentioned by a foreign intelligence target.

During the Obama years, warrantless surveillance programs vastly expanded, giving the government more power than ever to monitor American citizens — including political opponents — by collecting emails, texts, phone records, chats, locations, purchases, and other private information en masse.

Under the new rule, only communication to and from those targets will be collected.

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.” 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.” The decision is an effort to remedy privacy compliance issues raised by rules implemented in 2011 by the Foreign Intelligence Surveillance Court, which operates in secrecy, sources familiar with the matter said.

It took six years and a new Republican administration, but now hopefully the government will stop gathering massive amounts of information on innocent Americans.

Section 702, the statute that allows the NSA to collect internet communications and data in bulk, is due to expire at the end of the year unless Congress reauthorizes it. Thanks in part to Edward Snowden, the NSA will be facing a bigger uphill battle than usual when renewing the statute.

Julian Sanchez, a privacy and surveillance expert with the Cato Institute, a libertarian think tank, called the decision “very significant” and among the top priorities of surveillance reform among civil liberties groups. “Usually you identify a specific individual to scrutinize their content; this was scrutinizing everyone’s content to find mentions of an individual,” Sanchez said.

Senator Ron Wyden (D- OR), a longtime privacy advocate, said in a statement that he would introduce legislation “banning this kind of collection in the future.”

“This change ends a practice that could result in Americans’ communications being collected without a warrant merely for mentioning a foreign target,” Senator Ron Wyden said in a statement. “For years, I’ve repeatedly raised concerns that this amounted to an end run around the Fourth Amendment. This transparency should be commended. To permanently protect Americans’ rights, I intend to introduce legislation banning this kind of collection in the future.”

Better late than never.

In the meantime, we may soon be finding out more about how for eight years the Obama administration exploited foreign intelligence collection authority to spy on its political opponents at home.