Twitter has lodged an appeal against a New York judge's decision that it must hand over detailed information related to an Occupy Wall Street protester charged with disorderly conduct.

In July, Twitter was ordered to hand over almost three months' worth of messages and other details related to the account of activist Malcolm Harris. Harris was among the hundreds of protesters accused of disorderly conduct during a protest on Brooklyn bridge last October.

Prosecutors have argued that Harris's tweets show he knew he should not have been on the bridge. He has filed his own appeal, arguing that the judge's ruling would hand over details of where he was and who he spoke to, as well as his tweets, and falls "so far outside the realm of a legitimate ruling that we are entitled to a pre-trial appeal".

Twitter has argued that the posts belonged to Harris and, as such, it would be violating his fourth amendment right against unreasonable searches if it were to disclose the communications without first receiving a search warrant.

The case has evolved into a closely watched legal scrap over the extent of the US authorities' right to access information from social networks. Twitter has previously resisted attempts by the US authorities to access the account of Icelandic MP and former WikiLeaks associate Birgitta Jónsdóttir.

The American Civil Liberties Union (ACLU) has filed a motion with the court in support of Twitter. ACLU attorney Aden Fine said: "Under the first and fourth amendments, we have the right to speak freely on the internet, safe in the knowledge that the government can't get information about our speech without a warrant and without satisfying first amendment scrutiny.

"We're hopeful that Twitter's appeal will overturn the criminal court's dangerous decision, and reaffirm that we retain our constitutional rights to speech and privacy online, as well as offline."

The New York district attorney's office issued a subpoena to Twitter in January calling on the firm to hand over "any and all user information, including email address, as well as any and all tweets" for the period in question.

Last month Manhattan criminal court judge Matthew Sciarrino rejected most of Twitter arguments that the authorities were infringing Harris's constitutional rights, and said that Twitter owned his messages.

Sciarrino said he would review all the material that he ordered turned over and would pass on "relevant portions" to prosecutors.