The New York Civil Liberties Union and its national counterpart, the ACLU, filed a friend-of-the-court brief Thursday to oppose the Manhattan District Attorney’s 2013 search warrants forcing Facebook to turn over contents of 381 user accounts as part of a Social Security fraud investigation.

The district attorney’s office secured the warrants from the New York County Supreme Court in July 2013, requesting the users’ private messages, chat histories, photos and other profile information. The court also issued a gag order prohibiting Facebook from notifying the users that their profiles were being searched.

A month later, Facebook challenged the constitutionality of both the warrants and gag order. Manhattan Supreme Court Justice Melissa Jackson denied Facebook’s motion to dismiss, calling the social network an “online repository of digital information” where user information is subject to search and seizure.

Facebook appealed to the Appellate Division, First Department. According to the NYCLU’s amicus brief, the sweeping warrants violate users’ Fourth Amendment and state constitutional rights against unreasonable searches. It also states the gag order was a prior restraint on speech in violation of the First Amendment.

“The sensitive information we share on social media, like where we’re going and who we’re seeing, our political affiliations, our hobbies and our private conversations, are owed the highest level of protection,” said NYCLU Executive Director Donna Lieberman in a news release.

The case is In Re 381 Search Warrants Directed to Facebook, Inc., 30207-13.