Twitter filed a lawsuit against the Trump administration Thursday over allegations that government officials had tried to force the social media company to reveal the identity behind an anonymous account critical of Trump and his immigration policies.

The lawsuit alleges that U.S. Customs and Border Protection issued a summons to Twitter in March, demanding that it turn over records that would unmask the identity of the user or users behind the @ALT_uscis, or “ALT Immigration,” account ― an anonymous account that is purportedly run by federal immigration authorities. The account is one of more than a dozen “rogue” federal agency accounts that appeared in the wake of Donald Trump’s January inauguration and posts criticisms of the president’s positions on science, climate change and other issues.

The U.S. Department of Homeland Security, which oversees CBP, was also named as a defendant in the suit, which was filed in federal court in San Francisco, where the company is based.

Twitter filed the suit to challenge the order to reveal the account user’s true identity, saying that unmasking users would be a violation of the First Amendment rights of the company and its users.

“Compelled disclosure of the identities of Twitter users who have engaged in pseudonymous speech would chill their exercise of the constitutionally protected right to speak anonymously,” the lawsuit reads. “Moreover, independent of its users’ rights, Twitter’s actions in providing a platform for the dissemination of its users’ speech — including its decision to permit the publication of pseudonymous speech — is fully protected by the First Amendment.”

The American Civil Liberties Union said it would be defending the user behind the account and their right to anonymous speech on the platform.

We're glad Twitter is pushing back. We'll be going to court to defend this user's right to anonymous speech. https://t.co/tqj5XrNvgn — ACLU National (@ACLU) April 6, 2017

According to the suit, CBP told Twitter it is “required” to “produce for inspection” all records regarding the @ALT_uscis account including “user names, account login, phone numbers, mailing addresses, and I.P. addresses.”

The records are required “in connection with an investigation or inquiry to ascertain the correctness of entries” and to “determine the liability for duties, taxes, fines, penalties, or forfeitures, and/or to ensure compliance with the laws or regulations administered by CBP and ICE,” CBP said in its summons, according to Twitter’s filing. The summons also requested that Twitter refrain from disclosing the existence of the summons “for an indefinite period of time.”

The order said that failure to comply with the summons could result in Twitter being taken to federal court, according to the suit.

DHS declined to comment on the suit.

UPDATE 4/7/17: One day after Twitter filed its suit against the U.S. government, the feds abandoned their effort against the social media company. Twitter has voluntarily withdrawn its lawsuit.

Read Twitter’s lawsuit below: