PORTLAND, Maine — Maine police have been using a controversial computer program developed to monitor the public’s social media posts.

The program, known as Geofeedia, works by pinpointing the location of people who are posting publicly on social media platforms, such as Twitter and Facebook.

Geofeedia was developed with financial support from the CIA. As it has gained traction with police who use it to track protests and look for danger signs like the word “gun” online, it has also become the center of a national debate over privacy and government surveillance.

“People don’t realize that the government is monitoring the personal information they share,” said Zachary Heiden, legal director at the American Civil Liberties Union of Maine. “This isn’t just the police standing in a public square. This is the police standing in our bedrooms and living rooms.”

Police say that they are merely listening in on public statements. But privacy and free speech advocates contend that people shouldn’t have to worry about government surveillance when speaking their minds online. Perhaps as a result of such criticism, last month Facebook, Twitter and Instagram cut Geofeedia off from their data.

The South Portland Police Department began using Geofeedia in 2014 and recently renewed its subscription for a third year, said officer Kevin Gerrish, who coordinates the program for Maine’s fourth most populated city. The Maine State Police also purchased a license for the program, according to Gerrish and State Police officer Kyle Willette, although neither could provide details.

But thousands of dollars later, the South Portland police say that, at least for their department, the high-tech surveillance hasn’t led to any arrests.

Geofeedia has cost the South Portland department $13,500, which was mostly paid for through a grant, according to the department.

But the program mostly returns false hits.

“Most of the hits we get are someone going hunting and talking about their shotgun, so we get some nice pictures of a freshly killed deer,” said Gerrish. “We haven’t had very much success. I think it’s a program that a bigger city might benefit more from it.”

The Maine State Police would not answer questions about Geofeedia. Doing so would “disclose investigative techniques and procedures (or the lack thereof) … not known by the general public,” State Police lawyer Christopher Parr wrote in an email.

Geofeedia lets users continuously monitor a given area — as small as a city block — for use of specific phrases for posts on several social media platforms through the GPS technology built into smartphones. It works by aggregating data from public posts, including background information — like location — that may be public even if some user doesn’t realize it. (Whether social media sites like Facebook, Twitter and others broadcast your location depends on your phone and application settings.)

“Some people misunderstand and think that we’re prying into people’s personal accounts, but it has nothing to do with that,” Gerrish said.

In South Portland, the police have been using the program to scan for keywords that might signal a public safety risk. For instance, the department has monitored for phrases associated with suicide or self-harm around schools during stressful periods like final exams, or looks out for words like “gun” or “fight” during large public events.

The department doesn’t keep an archive of social media posts it has monitored, according to Gerrish, although Geofeedia advertises this function.

Another South Portland officer, who works with the the Maine Computer Crimes Task Force, and the officer assigned to South Portland schools are the primary users of the program, according to Gerrish. The program once alerted the school resource officer to someone thought to be potentially suicidal based on social media posts, but “nothing came of it,” Gerrish said.

Police officers in Portland, Lewiston and Bangor said that their departments do not use Geofeedia nor similar programs. But law enforcement in many of America’s largest cities do, and its use to target protesters has drawn harsh criticism from civil libertarians, who argue that

such surveillance has a chilling effect on the constitutionally protected freedom of speech.

The Boston City Council is slated to question the city’s police next week about its planned use of similar technology.

Twitter, Facebook and Instagram stopped sharing data with Geofeedia after the ACLU of Northern California obtained documents that suggested the company had been accessing data in a way prohibited by its developer agreement. Losing the dominant social media sites has been a blow to the Chicago-based company, and for police the “power of the program has dwindled,” Gerrish said.

There are, however, a variety of other programs similar to Geofeedia. The ACLU of Maine warned that people need to be aware that the government is increasingly watching what they do online.

“As government surveillance technology evolves, we all have to be smarter about how we communicate,” Heiden said.