The American Civil Liberties Union (ACLU) has filed a federal class action seeking to block the Trump administration from using grand jury subpoenas to identify people who anonymously criticise its immigration enforcement policies. Civil rights lawyers say the investigation violates the users’ First Amendment rights.

Filed on Friday, the lawsuit asks a district court in Washington to stop the Departments of Justice and Homeland Security from carrying out what the ACLU calls a “bad-faith investigation”. The case represents four unnamed social media users and challenges subpoenas seeking account information from platforms including Meta, Bluesky and X, formerly known as Twitter.

The investigation’s scope remains unclear. The ACLU says government lawyers have issued dozens of grand jury subpoenas seeking critics’ identities and personal information for US Immigration and Customs Enforcement (ICE) investigators. ACLU lawyers say US Attorney Jeanine Pirro’s office has referred to the effort as “Investigation 18”.

Chief Judge James Boasberg ordered the case unsealed on Wednesday. He scheduled a hearing for January 6 on the ACLU’s request for a preliminary injunction. The administration has until December 14 to respond in writing to the allegations.

Spokespeople for the Department of Homeland Security and Pirro’s Washington office did not immediately respond to The Associated Press’s requests for comment. Pirro, Attorney General Todd Blanche and DHS Secretary Markwayne Mullin are named as defendants.

The ACLU says the subpoenas are part of a broader pattern of intimidation. The organisation says DHS sent hundreds of administrative subpoenas to technology companies in the past year seeking information about online critics of ICE, and that the administration turned to grand jury subpoenas—a more secretive process—after users and companies pushed back against the administrative requests.

The lawsuit’s plaintiffs include a Bluesky user who commented on an ICE-related shooting in New York, posting: “Burn ICE to the ground. Burn DHS to the ground. Salt the earth.” Another plaintiff is a college student whose posts on X included an expletive directed at DHS, ICE and Trump.

The ACLU describes the case as the “first systemic civil challenge, and the first case that will be litigated in public view, to the Trump administration’s abuse of grand jury unmasking subpoenas.” Its lawyers said the investigation “is a bad-faith fishing expedition initiated to gather intrusive intelligence and facilitate retaliation against dissenters.”

“The government is weaponizing the grand jury process to retaliate against people for expressing their political views online,” Laura Moraff, an ACLU staff lawyer, said in a statement. “The First Amendment guarantees our right to criticize the government, including anonymously, and no one should fear being investigated for disagreeing with the president. This crackdown on dissent is antithetical to our nation’s core values.”

ACLU lawyers wrote that the subpoenas were being issued amid “repeated suggestions that Defendants are building a database of dissenters”. Laura Follansbee, a staff lawyer with the ACLU of DC, called the use of grand jury subpoenas “an alarming abuse of power”.

“The use of subpoenas to punish social media users for their speech is chilling not only for our clients but for others who fear being targeted because of their political beliefs,” Follansbee said.