The principal of a prestigious school near St. Petersburg summoned 16-year-old Leonid Shaidurov and 14-year-old Maxim Dautov in for a chat. Then he threatened them with expulsion, a criminal probe and being blacklisted from all Russian universities.

Their crime? Setting up an independent student union.

But Shaidurov and Dautov, children of the social media era, did not take the threats lying down. Instead, they went public about their altercation with the principal last month. The student union's ranks swelled and education authorities in St. Petersburg, Russia's second-largest city, came out in support of the teenagers, not the principal.

Many other young Russians have had their first taste of political activism in street protests against corruption and the banning of rap music, protesting the authoritarian status quo that their parents have unhappily gotten used to.

Russian teenagers putting up a social media fight against the rigid, Soviet-like attitudes of some teachers was one of Russia's political highlights of the year.

Shaidurov and Dautov came up with the idea after reading about Vladimir Lenin, Karl Marx and the U.S. trade union movement. They realized that their own problems — strict and unnecessary testing, dress code restrictions — had resonated elsewhere and would make a rallying cause for a student union.

"At first, everyone was laughing at Leonid and me, because it was just the two of us," says Dautov, who wears multiple rings and a "Revolutionary Workers Party" badge on his scarf.

Two separate groups of the new student union held their first meetings in mid-November at a soccer field near the sprawling concrete school.

Shaidurov, who led both meetings, was summoned to the principal and told he had organized an "unsanctioned rally" that would be investigated by prosecutors. His and Dautov's parents were later hauled over the coals.

Later on, police officers visited the school to conduct "a preventive discussion" to warn the students about the dangers of staging unsanctioned rallies and extremism, a widely defined term that Russian authorities have used to go after dissenters of all stripes.

At the next parent-teacher meeting, parents were told that their children had joined an "extremist organization" and would be blacklisted from entering college, according to Shaidurov's mother, Yelena, who teaches history at the school.

To the boys, this was only "pouring the oil onto the flame," Dautov said.

They spread the word on social media about the pressure and their case was taken up by the press. The number of student union members swelled from 70 to 200. Soon the city's Department for Education said students had the right to set up a union "as long as it doesn't impede the educational process."

The principal and the city's Department for Education would not respond to multiple requests for comment by The Associated Press.

Students elsewhere in Russia are standing up, too.

A high school student in the Urals city of Perm was turned away from class in December because she dyed her hair pink, and was told not to return until she changed it back. She mounted a social media campaign. Prosecutors went to check the school and found that the girl's rights were violated. Later, the Perm education department banned schools from strict dress code rules.

In Komsomolsk-on-Amur in Russia's Far East, a teacher has been suspended after a video of her pushing a teenager onto the ground and spanking him was posted online. Investigators have opened a criminal case.

Alexander Kondrashev, a teacher from St. Petersburg who belongs to an independent teachers' union, says the power dynamics between Putin-era teenagers and predominantly Soviet-educated teachers is starkly different from a generation earlier.

"It's much harder for a teacher to control the situation with children these days," he said. "First, children have a clearer idea of their rights and they are ready to stand up for them. And second, audio and video recordings have given them a significant information clout."

The St. Petersburg students claim the student union is not a political organization and are cagey about their own political views, saying "this is where the problems might start."

Like typical teenagers, they are annoyed with age restrictions: a Russian at 14 is not allowed to vote or drive or drink.

"It's weird, because you can be sent to prison and contract TB at 14, but you can drink and smoke and express yourself fully only when you're 18," Dautov says.

The system that Shaidurov and Dautov have been fighting against replicates the Russian government power structure in miniature.

The principal is answerable only to superiors in the education ministry while the students do not have much say in decision-making at school. Shaidurov and Dautov's school has its own student body but it works hand in hand with the administration and lacks any powers.

"We even have a newspaper and a YouTube channel — allegedly for students — which is dead and no one watches it," Dautov says, scoffing at the fact that instead of discussing real issues that students face, from high workloads to image pressures, the existing body debates "what kind of Christmas tree to put up."

Likewise, the often-strong reactions of teachers to anyone who undermines the existing power hierarchy mirror Russia's overall power structure. Teachers, who are paid by regional and federal budgets, are also under constant pressure from authorities, including when they run election precincts.

"It's a natural reaction of a person who himself is in fear. They're scared of the state, feel vulnerable and unprotected," said Kondrashev, speaking of teachers lashing out at students in numerous Russian videos posted online.

Svetlana Agapitova, government-appointed ombudswoman for children's rights in St. Petersburg, was one of the first officials who sided with the boys. She said adults should be proud that teenagers are taking an interest in political and economic topics.

The conflict also comes from the fact that the average age of a Russian school teacher hovers around 50, meaning that most were educated in the Soviet Union. Today's schoolchildren, born in Putin's era with instant access to information, are sincerely baffled by restrictions that have been in place for decades.

"It's hard for older teachers to change their ways because the authority of a teacher in school used to be indisputable," Agapitova says. "And to launch a dialogue with a student and discuss something with them — not everyone can do it."

Dautov, 14, was originally skeptical of his parents' willingness to speak to reporters about the case.

But Dautov's father Marat voiced support for his son, saying that he and his friends "want to improve our lives. We all want this, too, but it's just that they are not afraid."

"Maybe it will work out for them and things will get better in our country," he mused.