MOSCOW — A Russian blogger was convicted on Thursday of inciting religious hatred for playing “Pokémon Go” in a church, and given a suspended sentence.

Ruslan Sokolovsky posted a video on his blog last year showing him playing the smartphone game in a church built on the supposed spot where the last Russian tsar and his family were killed. He has been in detention since October.

Judge Yekaterina Shoponyak on Thursday found Sokolovsky guilty of inciting religious hatred and gave him a 3 ½-year suspended sentence. It is the same offense that sent two women from the Pussy Riot punk collective to prison for two years in 2012.

Sokolovsky’s behavior and his anti-religious videos manifested his “disrespect for society,” Judge Yekaterina Shoponyak said in televised remarks, adding that Sokolovsky “intended to offend religious sentiments.”

Shoponyak pointed out that the 22-year old video blogger was on trial not only for playing the game in the church but also for posting several videos that offended believers. She listed “mockery of the immaculate conception,” ”denial of the existence of Jesus and Prophet Muhammad” and “giving an offensive description of Patriarch Kirill,” the head of the Russian Orthodox Church.

Speaking to reporters after the verdict Sokolovsky thanked the media for raising the alarm about the trial, which has been widely described as a witch hunt: “I would probably have been sent to prison if it wasn’t for the journalists’ support.”

Once an officially atheist state, Russia has made a stunning turnaround since the fall of the Soviet Union with the majority of Russians now identifying themselves as Orthodox Christians. Although most Russians are not observant, the Kremlin has been eager to harness faith to promote its own agenda. The guilty verdict for the Pussy Riot members emboldened radical religious activists who have been successful in their public campaigns to get theater performances banned and exhibitions closed. Last year, activists launched a drive to collect signatures to end state funding for abortion.

Sokolovsky’s conviction caused outrage in Russia with many prominent figures describing it as a condemnation of atheism.

“I was born and grew up in the Soviet Union where 98 percent of citizens were atheists,” opposition leader Alexei Navalny said on Twitter on Thursday while the hearing was being webcast. “And now I’m listening to a verdict where a man has been convicted for atheism.”