Twitter announced on Thursday that it had received a demand from U.S. officials for records that could reveal the user behind an account opposed to President Donald Trump, one @ALT_USCIS, and that it in response it was was challenging the demand in court.

Twitter said it was filing the lawsuit to prevent the U.S. Department of Homeland Security (“DHS”), U.S. Customs and Border Protection (“CBP”), and the individual Defendants from "unlawfully abusing a limited-purpose investigatory tool to try to unmask the real identity of one or more persons who have been using Twitter’s social media platform, and specifically a Twitter account named @ALT_USCIS, to express public criticism of the Department and the current Administration."

Moments after the news of the lawsuit broke, the Twitter account in question tweeted the following:

Twitter notes that "in the just over two months since it was created, @ALT_USCIS has frequently criticized the immigration policies of the new Administration, highlighted what the user views as a history of waste and mismanagement within USCIS and DHS, and publicized facts that the account’s users portray as casting doubt on Administration policies."

Some more details from the lawsuit:

The rights of free speech afforded Twitter’s users and Twitter itself under the First Amendment of the U.S. Constitution include a right to disseminate such anonymous or pseudonymous political speech. In these circumstances, Defendants may not compel Twitter to disclose information regarding the real identities of these users without first demonstrating that some criminal or civil offense has been committed, that unmasking the users’ identity is the least restrictive means for investigating that offense, that the demand for this information is not motivated by a desire to suppress free speech, and that the interests of pursuing that investigation outweigh the important First Amendment rights of Twitter and its users. But Defendants have not come close to making any of those showings. And even if Defendants could otherwise demonstrate an appropriate basis for impairing the First Amendment interests of Twitter and its users, they certainly may not do so using the particular investigatory tool employed here—which Congress authorized solely to ensure compliance with federal laws concerning imported merchandise—because it is apparent that whatever investigation Defendants are conducting here does not pertain to imported merchandise.

And the heart of the complaint: according to Twitter, "the Defendants are now threatening the anonymity of the person(s) speaking through the @ALT_USCIS account. Specifically, on March 14, 2017, they issued and delivered to Twitter an administrative summons (the “CBP Summons”) demanding that Twitter provide them records that would unmask, or likely lead to unmasking, the identity of the person(s) responsible for the @ALT_USCIS account. The summons was issued by a Special Agent in Charge within U.S. Customs and Border Protection, another unit of DHS. The CBP Summons is unlawful and must be enjoined for two reasons."

First, the sole statutory authority CBP invoked in issuing the summons—19 U.S.C. § 1509—authorizes the agency to compel production of only a narrow class of records relating to the importation of merchandise. But CBP’s investigation of the @ALT_USCIS account plainly has nothing whatsoever to do with the importation of merchandise into the United States. Section 1509 thus provides CBP no power to compel Twitter to reveal information pertaining to the identity of the individual(s) behind the @ALT_USCIS account.

Second, permitting CBP to pierce the pseudonym of the @ALT_USCIS account would have a grave chilling effect on the speech of that account in particular and on the many other “alternative agency” accounts that have been created to voice dissent to government policies. The Supreme Court has long recognized the extraordinary value of the kind of speech emanating from these accounts—pure political speech criticizing government policies and highlighting government waste and mismanagement. And the Court has likewise recognized that anonymity is often essential to fostering such political speech where, as here, the speaker could face retaliation or retribution if his or her real identity were linked to the speech. In this context, the CBP Summons must be declared unlawful and enjoined absent an evidentiary showing by Defendants that some criminal or civil offense has been committed, that unmasking the users’ identity is the least restrictive means for investigating that offense, that the demand for this information is not motivated by a desire to suppress free speech, and that the interests of pursuing that investigation outweigh the important free speech rights of Twitter and its users. Defendants have not even attempted to meet that burden.

For these and other reasons discussed below, "Twitter requests that this Court declare the summons unlawful and enjoin its enforcement."

Much more in the full lawsuit below: