A US court has ordered Twitter to release old tweets and other details of a user arrested during an Occupy Wall Street protest in New York.
The micro-blogging firm refused at first, saying the tweets were owned by users and not Twitter.
"Twitter's terms of service make absolutely clear that its users 'own' their own content," said the firm's lawyer, Ben Lee.
"Our filing with the court reaffirms our steadfast commitment to defending those rights for our users."
But New York Judge Matthew Sciarrino said handing over the data would not violate the defendant's privacy.
"If you post a tweet, just like if you scream it out the window, there is no reasonable expectation of privacy," the judge wrote in his decision.
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
However, Sciarrino said he would review the information and would release only the relevant sections to prosecution and defence lawyers, according to the BBC.
The information relates to Malcolm Harris, managing editor of the New Inquiry website, who was arrested on 1 October 2011.
Harris was among hundreds of other campaigners arrested during a march across New York's Brooklyn Bridge.
Those arrested say they thought police had given permission for the march. But prosecutors claim tweets by Harris will reveal he was aware of police instructions ordering protesters not to block traffic.
"We look forward to Twitter's complying and to moving forward with the trial," the district attorney's office said after the judge's ruling.
But Twitter expressed disappointment, saying: "We continue to have a steadfast commitment to our users and their rights."
The case is scheduled to go to trial in December.
The ruling came as Twitter revealed the US government accounts for 80% of requests for user information for use in criminal investigations, according to the Guardian.
Following Google's example, Twitter has released a transparency report for the first time on government requests for user information.
The report shows the US government makes more requests for information than any other government. It is also the most successful at extracting information, with 75% of requests being met.
From 1 January 2012, the US made 679 user information requests out of a total of 849, compared with: 98 requests from the Japanese government; 11 each from the Canadian and UK governments; and less than 10 for several other countries.
Twitter emphasised that it passed on requests for user information to the account holder in all cases, unless prohibited by law.