BOSTON (AP) — A social media monitoring tool used by the Boston Police Department to identify potential threats swept up the posts of people using the hashtag #MuslimLivesMatter and a lawmaker’s Facebook update about racial inequality, according to a report released Wednesday by the American Civil Liberties Union of Massachusetts.

The ACLU says in a report based on documents obtained through a public records request that the police department’s use of Geofeedia to mine the internet appears to have had little benefit to public safety while unfairly focusing on groups such as Muslims. Boston police say the ACLU’s conclusions are misguided and that the program helped police successfully monitor events that could lead to demonstrations or crowds and threaten security.

‘‘Our main focus in all of this is public safety, not targeting speech, not targeting people’s political affiliations,’’ said Lt. Det. Michael McCarthy. ‘‘And quite frankly, to have the ACLU to even make that insinuation is not only insulting, but it’s completely misinformed,’’ he said.