The sentence was two years short of the six and a half years prosecutors had sought, but still a very tough penalty for a brief melee that resulted in no serious injuries — especially considering that Mr. Luzyanin cooperated with prosecutors. It was the first serious criminal charge to be brought against any of the people who have taken part in the large anti-Putin demonstrations that began last December.

Though Friday’s ruling attracted less attention than the two-year sentence handed down to Pussy Riot, a group of anti-Putin punk rockers, in August, it will serve as a grave and unmistakable warning to those considering whether to take part in future events. News of the verdict filtered through Moscow’s activist circles late on Friday, and many responded with blunt shock.

“What is going to happen to the others — 10-year sentences? Will they be shot?” Maria Baranova, 28, who faces charges of participating in mass disorder based on videos taken at the May 6 rally, wrote in a blog post. “The situation has taken a baffling turn for everyone. Luzyanin cooperated fully, and there was not a single person seriously hurt by his actions.”

The rally on May 6 — on the eve of President Vladimir V. Putin’ s inauguration — was peaceful until a crowd in the tens of thousands confronted a line of police officers in full riot gear, who had been ordered to prevent them from marching to the Kremlin. In the resulting bottleneck, some sat down on the pavement while others tried to push their way through the police line. Officers charged into the crowd, swinging nightsticks, and some marchers threw chunks of asphalt at them.

The police reported that 20 officers had suffered injuries, and that three were hospitalized. For Russian authorities, the event supplied a vivid dividing line: After May 6, their tolerance for street activism was gone. Television commentators began warning of a deadly tide of radicalism, and Parliament rushed through a package of draconian laws on public gatherings.