MOSCOW — Three young women who staged an anti-Putin stunt in Moscow’s main Orthodox cathedral, and whose jailing became a cause célèbre championed by artists around the world, were convicted of hooliganism on Friday and sentenced to two years in a penal colony.

In the most high-profile rights case here in years, the imprisonment and trial of the women, members of a punk band called Pussy Riot, drew worldwide condemnation of constraints on political speech in Russia. Rallies in support of them were held in dozens of cities around the world on Friday, including Paris, New York and London, where demonstrators appeared outside the Russian Embassy wearing balaclavas, the band’s trademark headgear.

Human rights groups and Western governments, including the United States, immediately criticized the verdict as unjust and the sentence as unduly severe. Because the women acted as a group, they had faced a maximum sentence of seven years in prison. Prosecutors had urged a three-year sentence. The stiff punishment was handed down by a Moscow judge, Marina Syrova, who described the women as posing a danger to society and said they had committed “grave crimes” including “the insult and humiliation of the Christian faith and inciting religious hatred.”

As word of the sentences spread, a crowd of protesters outside the courthouse howled angrily, and then seemed to fall into a stunned silence. Sporadic protests and violent arrests continued throughout the evening.