A Russian court on Thursday moved two teenagers accused of "extremism" from prison to house arrest the day after hundreds of people took to the streets in Moscow demanding their release.
The Moscow Dorogomilovsky court ruled to put 18-year-old Anna Pavlikova, accused of creating an "extremist organisation" in March, under house arrest, Russian media reported.
Later the same day the court also placed 19-year-old Maria Dubovik, accused of the same charges, under house arrest.
The pair have been in preliminary detention for the last five months.
The case has shocked many Russians as the number of prosecutions for social media posts in the country grows.
The health of the teenagers has declined during their time in detention, according to their lawyer and relatives.
Pavlikova has been suffering from panic attacks and a loss of hearing, while Dubovik is reported to have a tumour.
On Wednesday, hundreds of people, many clutching stuffed toys, rallied in Moscow to demand the release of the two teenagers in a case they say is part of a growing Kremlin crackdown on Russian youth.
One of their demands was for Pavlikova and Dubovik to at least be placed under house arrest.
Lawyer Maxim Pashkov told AFP the security services had themselves pushed the creation of the allegedly extremist group.
The aim of the organization was to be to "restore Russia to its former glory" and offer financing for firearms training, he said.
"The allegation is based on the testimony of three infiltrating security service agents, who have been out of contact since the group was arrested," Pashkov said.
The eight people arrested, aged between 17 and 30 at the time, had simply been idly complaining about the state of the country, he added.
An increasing number of Russians, including teenagers, are being prosecuted because of posts on social media -- in some cases even "likes" or reposts -- branded extremist by the authorities.
Last year, tens of thousands of young people took to the streets in protests organised by opposition leader Alexei Navalny, who is ignored by the Russian state media but is very active on social networks.