The popular Russian YouTuber was convicted Thursday for insulting religious believers and inciting hatred after he filmed a Pokemon Go video in a church.

Prosecutors had asked for a prison sentence of 3 1/2 years, Russian news agency TASS reported . Sokolovsky, 22, said he was relieved to get a suspended sentence for the same period.

In his video, Sokolovsky explains that he decided to film in the church after seeing a news report threatening legal implications for doing so. He recorded it in August, when the augmented reality game became a global phenomenon

On camera, Sokolovsky walks into the Church of All Saints in Yekaterinburg, catches a few Pokemon, and walks out.

"Who could get offended if you're just walking around with your smartphone in a church?" he concludes.

Sokolovsky was arrested the following month under Article 282 -- incitement of hatred or enmity and humiliation of human dignity -- and Article 148 -- violation of the right to freedom of conscience and freedom of religion -- of the Criminal Code of the Russian Federation, according to Amnesty International . He was detained for several months and faced up to five years in prison.

Sokolovsky pleaded not guilty and apologized for the video, TASS reported.