NEW YORK (Reuters) - An Occupy Wall Street protester who has waged a legal battle to keep his tweets from falling into prosecutors' hands will plead guilty to a charge of disorderly conduct on Friday, his lawyer said on Wednesday.

The case against Malcolm Harris, 23, one of hundreds arrested during a mass march across the Brooklyn Bridge in October 2011, had drawn the attention of electronic privacy advocates who worry that it could limit the rights of Twitter users in the future.

Harris' attorney, Martin Stolar, said he has conferred with Criminal Court Judge Matthew Sciarrino and expects that Harris will be sentenced to time served when he pleads guilty.

The maximum penalty is 15 days in jail, though first-time offenders are rarely imprisoned.

The judge could not be reached for comment after regular business hours. A spokeswoman for the Manhattan district attorney's office said prosecutors have not agreed to any plea deal.

Stolar said he did not need prosecutors' approval because Harris is willing to plead guilty to the offense with which he is charged.

The Brooklyn Bridge protest occurred at the height of the Occupy movement, which drew thousands of activists in New York and across the country angry at what they called an unfair economic system.

Prosecutors filed a subpoena on Twitter seeking months of Harris' tweets before and after the march, claiming they could undermine his defense that police appeared to lead protesters onto the bridge's roadway before arresting them for obstructing traffic. The tweets are no longer available online.

Both Harris and Twitter are challenging the subpoena in court. But Sciarrino rejected their arguments in separate rulings earlier this year.

Twitter handed over the tweets in September after Sciarrino threatened it with civil contempt and hefty fines.

Harris will also have the right to appeal the subpoena ruling once his criminal case is resolved, Stolar said.

By pleading guilty, Harris likely would ensure that his tweets remain out of view, rather than becoming public as trial evidence. Stolar said Harris had some concern that the tweets could implicate other Occupy defendants.

"This is a way to preserve his right to appeal (the Twitter issue), which is more significant than going to trial on disorderly conduct," Stolar said.

The case addresses a broader legal question that courts have rarely, if ever, tried to answer: whether a Twitter user can fight a law enforcement request for their tweets.

Sciarrino has said that only Twitter can mount a legal challenge, as it is the company, and not the user, that owns the content. That runs counter to Twitter's own stance, which holds that users have a proprietary interest in their own tweets.

Several privacy advocates, including the American Civil Liberties Union, have filed an amicus brief in support of Twitter's appeal. The concern is that Sciarrino's holding could set a precedent putting the burden on social media companies to protect their users from criminal prosecution.

In ruling against Twitter in June, Sciarrino said there could be no expectation of privacy for users when they publicly post messages on the Internet.