The Department of Homeland Security gathered data on observers of immigration enforcement activities and retaliated against them in violation of the First Amendment and other federal law, according to a lawsuit filed Friday.

Electronic Privacy Information Center and three individual observers said that the department’s Protester Surveillance Policy should be declared illegal and blocked by the US District Court for the Southern District of California.

DHS deployed “a dragnet of drones, body cams, face-scanning apps, license-plate scanners, and camera phones” to consolidate data on protesters, the lawsuit said, citing public reports. Immigration and Customs Enforcement also told a Democratic congressman that it collects identifying information on people potentially obstructing ICE operations, the suit said.

The three individual plaintiffs — from Minnesota, South Carolina, and California — said that after their involvement in legal observation, the government revoked their Trusted Traveler status under either Global Entry or TSA pre-check. They believe DHS revoked their status in retaliation against their protest activity.

Federal agencies are forbidden by the Privacy Act from collecting personally identifying information on those exercising their First Amendment rights, from maintaining such records unnecessary to accomplish an agency purpose, and from not providing public notice and justification for collecting that data, the complaint said.

The policy also runs counter to the Administrative Procedure Act, and the alleged retaliation is a First Amendment violation, the suit said.