Friends and colleagues of a Russian journalist arrested on drug charges have vowed to keep up pressure on the government after he was released from custody late on Saturday night.

The surprise decision to move Ivan Golunov to house arrest pending trial was seen as a minor victory, but supporters have now insisted on a full investigation into the officers who arrested and beat him, as well as continued protests until the government drops the charges against him.

“It’s still early to talk about this case being closed,” said Sergey Smirnov, the editor of MediaZona, a news site that covers Russia’s courts and prisons. “The police yesterday suffered a real defeat in court because house arrest is clearly a victory for the defence. But now the police will do everything they can to prevent this case from collapsing.”

Smirnov said the release was a political decision after an outpouring of support for Golunov led by prominent Russian journalists. Hundreds of people queued to picket police headquarters over the weekend. More than 300 people said they planned to attend a similar protest on Sunday evening.

“[Golunov] was likely placed under house arrest so that we would calm down and sit quietly, hoping that the investigation would sort it all out,” the protest invitation read. “We’ll go out to show the police, investigators and officials that we won’t calm down until Ivan is free and his place is taken by those who planted drugs on him to take revenge for his investigations.”

Russian courts very rarely release suspects from custody in drug cases Golunov could face up to 20 years in prison if convicted of drug possession with intent to sell.

Galina Timchenko, the chief executive of Meduza, where Golunov works, said: “This is not a victory, this is the first step toward liberating Ivan.” She thanked supporters for helping to protect Golunov, saying his life would have been in danger in a detention centre.

Golunov has investigated state corruption and illicit business practices and was reporting on a scheme to corner the market in funeral services before his arrest. He had been receiving threats before he was taken into custody last week.

Russia remains one of the more dangerous countries in the world for journalists, and reporters regularly face threats of violence and persecution by police. Gulnoza Said, of the Committee to Protect Journalists, said: “Russia has a long history of politically motivated charges against independent reporters. Investigative journalism is treated as a crime where it ought to be viewed as a public service.”

Nonetheless, the charges and treatment of Golunov, a prominent reporter based in Moscow, seem particularly flagrant. Police said they found 3.56g of the synthetic drug mephedrone in a backpack belonging to Golunov and 5.42g of cocaine in an apartment he purportedly rented in Moscow. Golunov has said the drugs were planted. Friends say he rarely drinks and never takes drugs.

The Guardian view on media freedom: democracies must defend it | Editorial Read more

The case has been marked by irregularities: Golunov was beaten while in police custody, sustaining bruises to his ribs and skull, because he refused to sign a police report without his lawyer present. His lawyer told the Guardian the police had pressured him to sign a confession.

The head doctor at a hospital that examined but refused to admit Golunov wrote on Instagram: “Golunov, as a journalist, certainly does not elicit [any] sympathy from me (I, as you know, am an extremely conservative person, from the USSR).”

In another highly unusual move, police released photos of a homemade drug lab that they said belonged to Golunov, then later deleted the photos saying they had been posted online by mistake.

Standing in a courtroom cage on Saturday evening, Golunov appeared ready for the worst. “I never thought I would be at my own funeral,” he said, weeping before the packed courtroom.

Moments later a judge said Golunov would be put under house arrest. Journalists who were in the courtroom wrote that they were sure of the decision only when they heard the cheer rise from the street outside.