Facebook and Instagram have banned developers from using their data for surveillance with a new privacy policy that civil rights activists have long sought to curb spying by law enforcement. Following revelations last year that police departments had gained special access to the social networks to track protesters, Facebook, which owns Instagram, announced on Monday that it had updated its rules to state that developers could not "use data obtained from us to provide tools that are used for surveillance". The news is a victory for civil liberties groups, which have increasingly raised concerns about mass surveillance and aggressive prosecutions of activists under Donald Trump's administration. "It's very important right now that tech companies like Facebook take a stand to be human rights champions, because otherwise they'll be used to violate human rights," said Malkia Cyril, executive director of the Center for Media Justice, part of a coalition that pushed for the anti-surveillance reforms. The American Civil Liberties Union obtained government records last year revealing that Facebook, Instagram and Twitter had provided users' data to a software company that aids police surveillance programs and had helped law enforcement monitor Black Lives Matter demonstrations. The ACLU found that the social networking sites had given "special access" to Geofeedia, a controversial startup that has partnered with law enforcement to track streams of user content. In response to the revelations, the tech companies cut off Geofeedia's access, though activist groups, including Color of Change, have continued to push for a broader policy restricting these kinds of collaborations. "Our goal is to make our policy explicit," Facebook said in its announcement on Monday. "Over the past several months we have taken enforcement action against developers who created and marketed tools meant for surveillance, in violation of our existing policies; we want to be sure everyone understands the underlying policy and how to comply." The ACLU praised the policy reform and said: "Written policies must be backed up by rigorous oversight and swift action for violations." "Now more than ever, we expect companies to slam shut any surveillance side doors and make sure nobody can use their platforms to target people of color and activists," Nicole Ozer, technology and civil liberties director at the ACLU of California, said in a statement. The ACLU's previous investigations had found that social media surveillance software companies had referred to unions and activists as "overt threats" and that one police agency in California used tools to track South Asian, Muslim and Sikh protesters. In December, ACLU findings also prompted Twitter to block federally funded "domestic spy centers" from using certain social media monitoring technology. "We need to see a situation where activists don't even have to prompt Facebook to take action," Cyril said. "We need to see real consistent and clear enforcement ... When the pressure becomes greater, we need to see them stand firm." Stories of police targeting protests using social media have become increasingly common. Last week, law enforcement in Washington state obtained a warrant to search a Facebook community page associated with the high-profile protest against the Dakota Access pipeline. The warrant served on Facebook, which the ACLU is challenging, sought personal and private information about users. Cyril said the policy change could push other firms to better protect users' privacy. "We hope Facebook will encourage other tech companies to refuse to share data for the purposes of wide-scale government surveillance."