A court in Russia ruled Wednesday to keep a prominent opposition politician in custody pending an investigation and trial over his public criticism of Russia's military actions in Ukraine.

Ilya Yashin is one of the few opposition figures that haven't left Russia despite the unprecedented pressure the authorities have mounted on dissent. He has been charged with spreading false information about the Russian military — a new criminal offense for which he faces up to 10 years in prison if convicted.

Yashin, 39, rose to prominence in 2000s as an opposition activist and ally of the slain opposition leader Boris Nemtsov. In 2017, he was elected chair of a Moscow municipal council. He is also a vocal supporter of Russia's imprisoned opposition leader Alexei Navalny.

The charges against Yashin were reportedly brought over a YouTube livestream video in which he talked about Ukrainians being killed in the Kyiv suburb of Bucha.

He was detained in late June in a city park and ordered to serve 15 days in jail for disobeying a police officer. Police said Yashin grabbed one officer by the uniform and insulted them, but the politician maintained the police approached him while he was sitting on a bench with a friend and demanded that he go with them without explanation.

Yashin was to be released from jail on Tuesday night, but was detained again on new charges and his apartment was searched. The Basmanny District Court on Wednesday ordered to remand him in custody until Sept. 12.

Yashin in court insisted that the charges against him were “politically motivated from the first to the very last page.”

“Don't be afraid of these scoundrels! Russia will be free!” he told journalists and supporters in the courtroom after hearing the judge's ruling.

The Kremlin has cracked down hard on people who criticize what Russia calls its “special military operation” in Ukraine. Vladimir Kara-Muza, a well-known opposition figure, was arrested in April and charged under the same law as Yashin.

Yashin's colleague in the municipal council, Alexei Gorinov, was sentenced to seven years in prison on the same charges for anti-war remarks — the first prison sentence to be handed down under the new law.

The law that criminalized the alleged spread of false information about the military was adopted a week after Russian President Vladimir Putin sent troops into Ukraine on Feb. 24 and amid a massive wave of public outrage about the invasion.

Thousands of people protested on the streets of Moscow and St. Petersburg daily, and hundreds of thousands signed online petitions opposing the attack on Ukraine.

But the Kremlin insisted its “special military operation” in Ukraine had overwhelming public support, and moved swiftly to suppress any criticism. Thousands of protesters were arrested, dozens of critical media outlets were shut down and critics have faced charges and prosecution.

As of Tuesday, the Net Freedoms legal aid group that focuses on free speech cases has counted 70 criminal cases involving alledged false information charges.

In a post that appeared in his Facebook account after he was remanded Wednesday, Yashin said he has known he would be arrested since Feb. 24 — the date of the Russian invasion.

“When the war began, I promised that I would not run away anywhere and would speak the truth out loud for as long as I can. And when they arrest me, I would take it with dignity. I'm keeping my word," the post read. “Don’t worry about me, friends. And I beg you, don’t let them intimidate you. I am not afraid — and you don't be. No to war.”

__

Follow all AP stories on fighting in Ukraine at https://apnews.com/hub/russia-ukraine.

Copyright 2022 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.