Twitter is contesting a US court order ordering it to hand over the message history of one of its users.
A New York state court has called on the firm to release tweets written by an activist who took part in the Occupy Wall Street protests last year.
The micro-blogging service disputes a judge’s ruling that messages are owned by the firm rather than its users.
The American Civil Liberties Union commended the company for defending free speech rights.
Twitter’s lawyer, Ben Lee, said: “Twitter’s terms of service make absolutely clear that its users ‘own’ their own content. Our filing with the court reaffirms our steadfast commitment to defending those rights for our users.”
The case centres around Malcolm Harris, managing editor of the New Inquiry website.
He was arrested on 1 October along with hundreds of other campaigners during a march across Brooklyn Bridge.
Prosecutors claim tweets by Mr Harris would reveal that he was “well aware of police instructions” ordering protesters not to block traffic.
Mr Harris’s lawyer had tried to block access to the postings, but a judge ruled that once the messages had been sent they became the property of Twitter, meaning the defendant was not protected by Fourth Amendment protection against unlawful search and seizure.
Twitter’s lawyers argued that the judge had misunderstood how the service worked, noting that the Stored Communications Act gave its members the right to challenge requests for information on their user history.