Facebook said New York prosecutors threatened it with contempt charges during a privacy flap in which the social networking site lost a bitter Fourth Amendment court battle, reluctantly coughing up user data on 381 users.

"We fought forcefully against these 381 requests and were told by a lower court that as an online service provider we didn’t even have the legal standing to contest the warrants. We complied only after the appeals court denied our application to stay this ruling, and after the prosecutor filed a motion to find us in criminal contempt," Chris Sonderby, Facebook's deputy general counsel, said Thursday.

The data demands came from New York prosecutors who sought photos, private messages, and other information as they investigate a disability fraud scam.

"This unprecedented request is by far the largest we’ve ever received—by a magnitude of more than ten—and we have argued that it was unconstitutional from the start," Sonderby said, adding:

Of the 381 people whose accounts were the subject of these warrants, 62 were later charged in a disability fraud case. This means that no charges will be brought against more than 300 people whose data was sought by the government without prior notice to the people affected. The government also obtained gag orders that prohibited us from discussing this case and notifying any of the affected people until now.

The court documents were sealed until days ago, when an appeals court lifted the gag order and allowed Facebook to notify the affected users that their data was handed over. A lower court said that Facebook did not have the legal standing to fight the warrants on behalf of its users. New York prosecutors said the warrants led to the indictments of firefighters, police officers and civil servants on fraud charges as part of a continuing three-year probe.

The Facebook data, like user photos, showed employees who claimed they were disabled performing a variety of activities, including fishing, karate, and even riding jet skis.

“This was a massive scheme involving as many as 1,000 people who defrauded the federal government of more than $400 million in benefits,” said Joan Vollero, a spokeswoman for Manhattan district attorney Cyrus R. Vance Jr. “The defendants in this case repeatedly lied to the government about their mental, physical, and social capabilities. Their Facebook accounts told a different story. A judge found there was probable cause to execute search warrants, and two courts have already found Facebook’s claims without merit.”

New York authorities said they have identified as many as 600 suspects and provided a state court with a 93-page affidavit supporting the individual warrants and maintained that all the data was relevant.

“In the course of a long-term criminal investigation, the relevance or irrelevance of items seized within the scope of a search warrant may be unclear and require further investigatory steps,” Supreme Court Justice Melissa Jackson wrote in denying Facebook's motion to dismiss the warrants.

On appeal, Facebook argued that "[t]he vast scope of the government's search and seizure here would be unthinkable in the physical world."