MEMPHIS, Tenn. — A federal judge will decide whether the police department in Memphis, Tennessee, violated free speech rights of protesters by watching them and monitoring their social media accounts.

A four-day trial concluded Thursday in a lawsuit filed by the American Civil Liberties Union that claims the Memphis Police Department engaged in improper surveillance of activists associated with the Black Lives Matter movement and other groups. Activists testified they were intimidated by members of the department who kept a close eye on them using several methods, including following their movements and spying on their social media activity.

Police officers acknowledged that the department uses cameras and data analysis to identify and track crime in the city for public safety reasons. But the department denied that it was engaged in surveillance of people because of their activism and political beliefs.

U.S. District Judge Jon McCalla presided over the non-jury trial. He has already ruled that the city violated a federal consent decree barring the city from engaging in political surveillance. The 1978 order followed disclosures that police spied on civil rights activists.

McCalla will issue rulings later on several issues, including if the ACLU has standing in the case, if the consent agreement should be modified and if police violated the activists' First Amendment rights by gathering political intelligence.

The lawsuit stems from protests in Memphis from 2015 to 2017, following the deaths of unarmed black men during confrontations with police in U.S. cities. That includes the fatal shooting of 19-year-old Darrius Stewart during a fight with a white police officer at a traffic stop in Memphis in July 2015. Protesters associated with the Black Lives Matter movement blocked the Interstate 40 bridge connecting Tennessee with Arkansas in July 2016 and rallied at Graceland, Elvis Presley's former home turned museum, weeks later.

The trial also provided insight into the police department's use of technology at its Real Time Crime Center. The center includes a bank of 36 screens that show high-definition images from the more than 1,000 stationary and mobile cameras situated throughout the city, according to testimony. The monitors are constantly watched, in efforts to identify criminal activity as it is happening, police said. But activists claim the cameras were used to identify and monitor protesters.

Police also used computer programs described as social media "collators," police officers testified. These programs allow users to track social media posts in a specified area during an event, with officers looking for keywords such "gun" or "violence," police Sgt. Bradley Wilburn said.

Maj. Lambert Ross, who commanded the center from 2014 to 2017, testified that cameras are helpful in identifying and preventing crime, but they are not used to identify protesters or gather intelligence on them.

The department did acknowledge using an undercover Facebook account under the name Bob Smith to connect with protest organizers. Sgt. Timothy Reynolds testified that he accumulated dozens of Facebook "friends" who had knowledge of planned protests and their participants.

One of those friends was activist Keedran Franklin, a leader of the bridge protest. Franklin also posted video of a "die-in" at Memphis Mayor Jim Strickland's house in December 2016.

Franklin said he has been followed by people associated with the police department, and he has felt harassed and intimidated.

"I don't feel like it will stop with the court proceedings," Franklin said. "It's just what they do."

Memphis Police Director Michael Rallings also took the stand. He filed a criminal complaint alleging that someone had created a fake Twitter account under his identity. Rallings said he feared people would believe he made the inflammatory statements posted on the account and cause the city to "erupt."

Activist Paul Garner, who has been publicly critical of the police department, testified that he created the account as "satirical commentary."

Garner also testified that someone at a bar told him to "watch your back" because police were watching him and people he worked with.