While officers raced to a recent 911 call about a man threatening his ex-girlfriend, a police operator in headquarters consulted software that scored the suspect’s potential for violence the way a bank might run a credit report.

The program scoured billions of data points, including arrest reports, property records, commercial databases, deep Web searches and the man’s social- media postings. It calculated his threat level as the highest of three color-coded scores: a bright red warning.

As a national debate has played out over mass surveillance by the National Security Agency, a new generation of technology such as the Beware software being used in Fresno has given local law enforcement officers unprecedented power to peer into the lives of citizens.

In many instances, people have been unaware that the police around them are sweeping up information, and that has spawned controversy. Planes outfitted with cameras filmed protests and unrest in Baltimore and Ferguson, Mo. For years, dozens of departments used devices that can hoover up all cellphone data in an area without search warrants. Authorities in Oregon are facing a federal probe after using social media-monitoring software to keep tabs on Black Lives Matter hashtags.

But perhaps the most controversial and revealing technology is the threat-scoring software Beware. Fresno is one of the first departments in the nation to test the program.

As officers respond to calls, Beware automatically runs the address. The searches return the names of residents and scans them against a range of publicly available data to generate a color-coded threat level for each person or address: green, yellow or red.

Exactly how Beware calculates threat scores is something that its maker, Intrado, considers a trade secret, so it is unclear how much weight is given to a misdemeanor, felony or threatening comment on Facebook. However, the program flags issues and provides a report to the user.

Nabarro said the fact that only Intrado — not the police or the public — knows how Beware tallies its scores is disconcerting. He also worries that the system might mistakenly increase someone’s threat level by misinterpreting innocuous activity on social media, like criticizing the police, and trigger a heavier response by officers.

“It’s a very unrefined, gross technique,” Nabarro said of Beware’s color-coded levels. “A police call is something that can be very dangerous for a citizen.”

The Fresno City Council called a hearing on Beware in November after constituents raised concerns. Once council member referred to a local media report saying that a woman’s threat level was elevated because she was tweeting about a card game titled “Rage,” which could be a keyword in Beware’s assessment of social media.

Councilman Clinton J. Olivier, a libertarian-leaning Republican, said Beware was like something out of a dystopian science fiction novel and asked Dyer a simple question: “Could you run my threat level now?”

Dyer agreed. The scan returned Olivier as a green, but his home came back as a yellow, possibly because of someone who previously lived at his address, a police official said.

“Even though it’s not me that’s the yellow guy, your officers are going to treat whoever comes out of that house in his boxer shorts as the yellow guy,” Olivier said. “That may not be fair to me.”

The number of local police departments that employ some type of technological surveillance increased from 20 percent in 1997 to more than 90 percent in 2013, according to the latest information from the Bureau of Justice Statistics. The most common forms of surveillance are cameras and automated license plate readers, but the use of handheld biometric scanners, social media monitoring software, devices that collect cellphone data and drones is increasing.

The surveillance creates vast amounts of data, which is increasingly pooled in local, regional and national databases. The largest such project is the FBI’s $1 billion Next Generation Identification project, which is creating a trove of fingerprints, iris scans, data from facial recognition software and other sources that aid local departments in identifying suspects.