People in Tajikistan were expecting a government crackdown after Tajik men were arrested and charged with a terrorist attack on a Moscow concert hall in March.

But it still seemed excessive to Nilufar, a 27-year-old education professional, when she saw local authorities with scissors outside a K.F.C. in Dushanbe, Tajikistan’s capital, trimming beards that were deemed too long.

Excessive, but not so surprising. In the span of a month, Nilufar herself had been stopped three times by the authorities for wearing a hijab in public.

“Nowadays, as soon as you go outside, you can actually feel how the raids have intensified,” Nilufar said in a recent interview in Dushanbe, providing only her first name because of fear of retribution.

With a population of 10 million, the vast majority of whom are Muslim, Tajikistan has many challenges that counterterrorism experts say make it an incubator for extremism: poverty, poor education, high unemployment and grievances against an autocratic government that severely restricts the practice of religion.

In the face of these challenges, critics say, Tajikistan has continued to restrict how Islam can be taught and practiced and increasingly implemented superficial policies regulating head scarves and beard lengths.