Maxim Reznik, the head of the Yabloko party in St. Petersburg, was detained during demonstrations shortly after Russia's March 2 presidential polls, which ended in a landslide victory for the Kremlin-backed Dmitry Medvedev. The polls were criticized at home and abroad as "undemocratic."
Reznik, an organizer of anti-Kremlin protests, has denied the charges. He faces up to five years in prison if convicted.
"The court found a [lower] district court's decision to arrest Reznik illegitimate and rules that Reznik should be released and the case reinvestigated," the presiding judge said.
Lawyer Boris Gruzd said Reznik, 33, who had held a four-day hunger strike in jail in protest against his arrest, was to be released on Friday.
Police claimed that Reznik had drunkenly insulted police officers and then assaulted one of them on the evening of March 3. The opposition leader claims however that he was a victim of police brutality, suffering a head injury and numerous bruises when he stepped in to help a friend who he says was being beaten by police.
Opposition groups have suggested that Reznik's arrest was motivated by his position as one of the organizers of an upcoming opposition conference to be attended by the Other Russia coalition and other groups.
The former world chess champion, Garry Kasparov, an outspoken Kremlin critic, said the conference would help opposition forces to establish a common position on vital issues in Russia.
The Russian opposition movement is also planning to hold rallies in Moscow and St. Petersburg in early May prior to the inauguration of Medvedev as president.
On March 13, St. Petersburg authorities ordered the Yabloko party out of its office by June, citing rent problems, Russian media reported. A day after the decision, the office was raided and party documents checked for "extremist activities."
Yabloko activists have held pickets in Moscow and St. Petersburg to demand Reznik's release.