MOSCOW — A Russian video comedy troupe in a small provincial city was doing just fine. It clocked up millions of YouTube views with mischievous political satire.

Then the comedians did a gag in which a drunken political boss with a grenade launcher blows up an election poster for President Vladimir Putin’s United Russia party.

They each could face up to eight years in jail, charged with “extreme hooliganism.”

“We’re not criminals. They’re trying to make us into criminals. We are not hooligans. We are just an ordinary film crew,” director Andrei Klochkov said in an interview with Russian independent media.

The team in Ussuriysk, north of Vladivostok in Russia’s Far East, has since been barred by a court from speaking to media, said its lawyer, Alexei Klyotskin.

For years, Russian authorities have expanded their crackdowns: curbing freedom of speech, sweeping away activists, pressuring rights lawyers and jailing Putin’s opponents. Prosecutors last month called for the liquidation of a venerable human rights group, the International Memorial Society, that has roots in Soviet-era dissent.

Now they are arresting comedians — seeking to muzzle any edgy comedy that might offend Putin loyalists or be seen as mocking Russian patriotism.

Until recently, stand-up comedy and freewheeling Internet posts were refuges from censors, said comedian Kirill Sietlov, who was jailed earlier this year after claims he organized a protest rally, a charge he denied.

He recently set up a Telegram channel for traumatized comedians to share their stories of persecution.

“It seemed that this was a truly free art form. Everything there was possible. There were no restrictions,” he said.

Now, however, the state “has launched a real campaign of fear — fear and hatred,” Sietlov said. Besides the police and intelligence agencies, informers and snitches play their part, drumming up outrage, claiming that comedians offended someone’s beliefs or dignity.

Stand-up comedians are scrolling through their old online content, removing cheeky jokes. YouTube comedy creators are fearful. Police and suspected plainclothes agents are turning up at comedy clubs. Comics are getting death threats.

Even harmless pranksters are targeted.

On an irreverent YouTube channel known as BARAKuda, a fictional character, Vitaly Nalivkin (the name is a play on pouring a drink), parodies a provincial official, slurring his words, issuing crazy orders and making local problems worse.

“This is a guy who thinks he always knows what to do, is very confident, who can never be wrong and is always right. He does whatever he wants. He’s funny because he is so recognizable to people,” said Andrei Ostrovsky, editor of the independent newspaper Novaya Gazeta in Vladivostok.

He said the sketch mocks the fawning local TV coverage of Ussuriysk’s mayor, Yevgeny Korzh, a member of Putin’s party — although director Klochkov and the BARAKuda team insist it is not supposed to be political.

The episodes are based on real Ussuriysk problems.

One skit addresses the city’s shortage of public toilets. The fictional character Nalivkin orders up rickety wooden latrines with no internal walls to be installed on every street.

Andrei Neretin, who plays Nalivkin, was jailed for five days last year after the show ran an episode about a corrupt police boss caught with boxes of money.

The September episode that led to the hooliganism charges centered on a suspicious bag at a bus stop. Nalivkin tries to shoot it with a grenade launcher, but accidentally blows up a United Russia election poster. The bag turns out to be full of carrots.

After it aired, Neretin was jailed again for two days — for swearing.

Larisa Krivonosova, who plays fictional Interior Ministry spokeswoman Marina Vulf in the skits, was fined for wearing a uniform, then jailed for three months over a parole violation on an unrelated 2017 charge. (The Vulf character appears to spoof the real Interior Ministry spokeswoman, Irina Volk, although the team denies it.)

Asked about the case, Kremlin spokesman Dmitry Peskov said political satire that “does not cross the line” isn’t prosecuted. But he warned: “This line is very thin.”

The law “stipulates responsibility for insulting and humiliating government officials,” he said.

“For us, stand-up became the embodiment of new sincerity,” said comedian Sietlov. “You could talk about sex, you can talk about religion, your parents, about very personal topics that may have been taboo before.”

At comedy clubs, humorless plainclothes men have begun filming shows on their cellphones.

“They have this vibe. They are a specific type,” said Sietlov, adding that comedians suspect they are from the FSB, the main successor to the KGB, or the government’s shadowy Center for Combating Extremism, which is known for curbing opposition activists.

“So tell me, do you think this affects comedy?” he said. “That there is a dude in a leather jacket sitting there, not laughing at their show? And the first thing that comes to the comedian’s mind is, ‘The FSB came for me.’

“You just feel the presence, that vague, dark presence. Who it is and why they do it is not clear,” he added. “But just in case, watch your mouth.”

Oleg Denisov, co-founder of the Steal the Show comedy club in Moscow, who has appeared at the Edinburgh Festival Fringe in Scotland, said authorities spread fear by randomly targeting comedians.

“So the message from this is that you can‘t really draw a line on what you can’t do or what you can do.

Still, he is combing through his jokes, reevaluating how a censor would see them. “Everybody’s doing it now,” he said.

Creativity itself is not dead, but Denisov added: “You write a joke and you put it in a drawer.”

It is not just political jokes that can get people into hot water.

Last month, a prankster from St. Petersburg, Kirill Smorodin, taped up a joke portrait of himself in 19th-century military uniform in the Hermitage Museum during an October exhibition on the 1812 Napoleonic War. He then posted photos online.

The museum called in police to investigate whether he had broken a law against insulting the dignity of veterans. Pilloried online, Smorodin apologized.

Idrak Mirzalizade, a Belarusian stand-up comedian of Azerbaijani descent, made an off-color crack about the xenophobia foreigners face in Moscow’s rental market. He was charged with inciting racial hatred against Russians. He apologized, but received death threats, was beaten up in the street and was jailed for 10 days. He fled the country.

The Interior Ministry banned him from Russia for life. The decision is under review by a court.

Sietlov said self-censorship — “a policeman appears in your head” — had taken hold even among bright young comics. But Putin and his allies remain a tempting target.

“If everything is going bad, none of your jokes work and you are losing the audience, you say, ‘Oh this damned Putin,” and then the people are on your side again,” he said. “They start laughing.”

Natasha Abbakumova contributed to this report.