A Russian military court found a playwright and a theater director guilty of “justifying terrorism” on Monday, sentencing them to six years in prison each in a case that critics say is the latest chilling example of the crackdown on free speech since Russia invaded Ukraine in February 2022.

The playwright, Svetlana Petriychuk, 44, and the director, Yevgenia Berkovich, 39, are both acclaimed members of the Russian theater world and have been in custody since May 2023. In addition to the six-year sentences, exactly the time frame requested by prosecutors, both women will be banned from “administering websites” for three years following their release.

The play Ms. Petriychuk wrote and Ms. Berkovich staged, “Finist the Brave Falcon,” is an adaptation of a classic fairy tale of the same name, interwoven with the stories of women baited online by men into joining the Islamic State. It is loosely based on the true stories of thousands of women from across Russia and the former Soviet Union who were recruited by ISIS terrorists. The main character of the play returns to Russia feeling betrayed and disappointed by the man who lured her there, only to be sentenced to prison as a terrorist herself.

The prosecutor, Ekaterina Denisova, insisted that Ms. Petriychuk holds “extremely aggressive Islamic ideologies” and formed a “positive opinion” of ISIS, according to the Russian outlet RBK, and that Ms. Berkovich holds “ideological convictions related to the justification and propaganda of terrorism.”

Both women and their lawyers said they were innocent, repeatedly insisting during the trial that the play had an explicitly antiterror message.

“I absolutely do not understand what this set of words has to do with me,” said Ms. Berkovich, when she pleaded not guilty. “I have never partaken in any forms of Islam: neither radical nor any other. I have respect for the religion of Islam, and I feel nothing but condemnation and disgust toward terrorists.”

In Russia, where more than 99 percent of criminal trials result in convictions, the verdict seemed all but a foregone conclusion. Judges sided with the prosecution and the witnesses they called. One witness, an expert from the Federal Security Service, the modern successor of the K.G.B., contended that because the play was based on a fairy tale, and fairy tales have happy endings, the play “romanticized the image of terrorism.”

The play premiered in 2020 and later won two Golden Mask awards, the highest honor in Russian theater and a prize supported by official structures, including the Moscow mayor’s office and the country’s ministry of culture.

Immediately following Russia’s full-scale invasion of Ukraine, law enforcement bodies initiated a campaign of widespread repression, effectively criminalizing antiwar sentiment.

The criminal case against the two Ms. Petriychuk and Ms. Berkovich began several months after a pro-Kremlin actor wrote a post on the social network VK.com expressing disgust that a play directed by an antiwar liberal would be shown in his city, Nizhny Novgorod, in the wake of Ukraine’s attack on the Crimean Bridge earlier that month. He labeled the show “undisguised sympathy for Ukraine and hatred of the current government.”

The performance there was canceled and the man, Vladimir Karpuk, eventually became one of the star witnesses for the prosecution.

The criminal case has been condemned by many prominent Russian intellectuals and performers, including the Nobel Peace Prize laureate Dmitri A. Muratov and the director Kirill Serebrennikov, under whom Ms. Berkovich studied. The women were also supported by Amnesty International, which said the women are “being targeted simply for exercising the right to freedom of expression,” and Human Rights Watch and other rights groups.

The trial at the Second Western District Military Court was closed to the public after the prosecution’s witnesses finished testifying. But a crowd of several dozen people gathered on Monday evening in front of the court to show support for the women, and some were allowed into the court to hear the verdict.

The two women’s supporters contend that this is the first time in Russia’s post-Soviet era that a work of art is effectively being put on trial. More than 16,000 people signed a letter, initiated by the independent newspaper Novaya Gazeta, in the wake of Ms. Petriychuk’s and Ms. Berkovich’s detentions last year.

“We are against the persecution of people on trumped-up charges,” the letter read. “Against ideology governing art. Against the destruction of theater and culture. Against singling out and snatching people in the theater industry who have decided to stay in their home country.”

world