Privacy rights advocates are speaking out against a Boston Police Department plan to spend $1.4 million on software that will help officers scan social media websites.

At a City Council hearing Monday, advocates said they're concerned about privacy rights, government surveillance and a crackdown on free speech. Boston police said the technology will be used to monitor criminal activity and threats made online.

Police officials appeared before the council, which was reviewing a $14.2 million federal Homeland Security grant awarded to the city's Office of Emergency Management. A portion of that grant — $300,000 — will be used by the police department to purchase the social media tracking software. (The rest of the $1.4 million that Boston police plan to spend on the software comes from other state and federal funding.)

Boston police didn't offer many details on how a social media surveillance program would work. Police Superintendent Paul Fitzgerald said the department is now undergoing a "confidential" bid solicitation process to assess which software it should use and will make the vendor public after a decision has been made.

"Whatever we pick will be used in accordance with a strong policy and it will be used within the guidelines of the law and our privacy policy," Fitzgerald said.

But advocates say the public should be able to weigh in on on the department's plan and policy regarding social media monitoring.

"We need to know — before we appropriate funds, before we hand the power of the purse over to the Boston police — what capability they are getting, how they are and are not going to use it, and decide — as an informed public -- whether we should provide that power," said Dolan Murvihill, a member of the privacy advocacy group Digital Fourth.

Advocates also raised concerns that police will use the technology to target certain groups. Kade Crockford, the director of the Technology for Liberty Project at the ACLU of Massachusetts, said the program could lead to unwarranted targeting of young people of color.

"We worry about the creeping of that kind of racial profiling from on the street to the internet," Crockford said, referencing a 2014 ACLU report that found blacks are disproportionately stopped by Boston police.

Taylor Campbell of Quincy expressed concern that social media monitoring will impact people outside of Boston since "social media doesn't have city boundaries." He likened social media sites to a public square and said keeping watch on them could have "a chilling effect on speech."

"In the public square, I don’t have a police officer behind me listening to all of my utterances all the time," Campbell said.

Fitzgerald said while many people use social media for good reasons, criminal activity is also taking place online — including terrorism recruitment, prostitution, child pornography and gang-related activity.

"People who we feel are driving the violence and carrying firearms, we’re going to look online at publicly available information," Fitzgerald said. "We prefer to be preventive than responding to crime."

David Carabin, the director of the Boston Regional Intelligence Center, said social media tracking software will help police better investigate threats.

"We currently do not have the tools to deal with the volume of data that we’re looking at here," Carabin said.

Some city councilors Monday suggested Boston police spend the funds another way.

"I think your best investment with $1.4 million would actually be to hire young people," Councilor Tito Jackson said, adding that young people often know more about what's happening on social media. "I think it’s really critical in real-time that we actually have folks who are dealing with these issues."

At-Large City Councilor Ayanna Pressley said she'd like to see the funds used for trauma response or to expand the police cadet program because we have an aging force and we need more officers, and we need to be closer in achieving gender and racial parity."

Social media tracking technology is already being used by other police departments. The ACLU released a report last month showing law enforcement used a surveillance program to track protesters in Baltimore and Ferguson, Missouri. The agencies got the information from social media data that was provided by Twitter, Instagram and Facebook to Geofeedia, a company that analyzes social media data. And recently, the FBI recently signed a deal that will give the agency access to Twitter's "firehose" of data -- about 500 million tweets daily.

The City Council will vote Wednesday on an order that would authorize the city's Office of Emergency Management to accept the $14.2 million federal homeland security grant, according to Councilor Andrea Campbell.