Image copyright Getty Images Image caption Police faced weeks of protests following the shooting of Michael Brown in Ferguson, Missouri

Facebook, Twitter and Instagram have revoked access to their data to an analytics firm accused of selling information that allowed US police to track activists and protesters.

The American Civil Liberties Union (ACLU) said Chicago-based Geofeedia had allowed police to "sneak in through a side door" to monitor protests.

Geofeedia said it was committed to the principles of personal privacy.

It comes amid growing concern about government access to social media.

ACLU said Geofeedia had been marketing its services to police agencies to help track activists using location data and social media posts.

The group said it had seen internal documents in which Geofeedia said that it "covered Ferguson/Mike Brown nationally with great success," referring to protests which erupted in 2014 after an unarmed African-American man was shot dead by police.

"The ACLU of California has obtained records showing that Twitter, Facebook and Instagram provided user data access to Geofeedia, a developer of a social media monitoring product that we have seen marketed to law enforcement as a tool to monitor activists and protesters," the group said in a statement.

"We know for a fact that in Oakland [California] and Baltimore [Maryland], law enforcement has used Geofeedia to monitor protests."

'Clear policies'

Nicole Ozer, technology and civil liberties policy director for the ACLU said: "These special data deals were allowing the police to sneak in through a side door and use these powerful platforms to track protesters."

Geofeedia Chief Executive Officer Phil Harris said the company was committed to the principles of personal privacy, transparency and individual rights and had clear policies to prevent the inappropriate use of its software.

"That said, we understand, given the ever-changing nature of digital technology, that we must continue to work to build on these critical protections of civil rights," he said in an emailed statement to Reuters news agency.

Facebook and Instagram ended Geofeedia's access on 19 September, the ACLU says.

A Facebook spokesperson said in a statement that Geofeedia only had access to data that people chose to make public.

Twitter said it was suspending access shortly after the ACLU announcement.