A motley battalion is trooping the colours in the snowy yard at the Cossack military school near Volgograd (formerly Stalingrad), nearly 1,000km south-east of Moscow. Aged seven to 17, the cadets, wearing camouflage clothing and matching hats, are standing to attention in a line. They are preparing for the ceremony to commemorate the 70th anniversary of the Red Army's decisive victory over the Germans, watched by President Vladimir Putin.

Obeying orders from their instructor, they turn their eyes right, then left, finally staring straight ahead at the flags blowing in the wind: the colours of Russia and the Nedorubovskaya stanitsa (Cossack settlement) that runs the school, only a few kilometres from the banks of the river Don, in the Cossack heartland.

Cheeks are rosy on this icy morning, but most of the 320 cadets will be going home to their families after a tough schedule of study, military training, singing and prayers.

The cadets file into the refectory, say grace and eat their meal in silence. In the entrance to the boarding house, the Cossacks' commandments set the tone: "Love Russia, for she is your mother and no one will ever replace her", or indeed "Those who march against the Motherland are your enemies".

The headmaster, Vladlen Stratulat, is proud of his recruits: "We have a 90% success rate in the unified state examination [at the end of secondary education]," he says. The curriculum is the same as elsewhere in the Russian Federation, but with military and patriotic training as an extra.

The school has a good reputation. The buildings are modern and the extensive grounds are perfect for exercising and of course riding, essential for true Cossacks. With their military training, the cadets hope to enter the army, police or intelligence service. What is more, the school is free. "Apart from buying the basic uniform, families pay nothing. We supply the ceremonial uniform, teaching, moral education, board and lodging," says Alexander Nikolaevich, the head of the teaching staff. Almost all the funding is provided by the ministry of nationalities and nearby Cossack communities.

The school, which opened in 2009, is a symbol of Cossack resurgence. Almost a century after they were nearly destroyed by the Bolsheviks, these fierce horsemen – recruited by Ivan the Terrible in 1571 to guard Russia's borders – are back in harness. Between the Don and the Volga, and further south near Krasnodar and Rostov, stanitsas have sprung up again. Russia's ongoing demographic worries have played a part in this trend. Ethnic Russians are increasingly anxious about the vibrant Muslim areas of the Caucasus, the only places where the population is growing. This suits the Cossacks, who see themselves resuming their traditional role as the guardians of the southern steppes threatened by Tatar hordes.

The Russian army has had a Cossack regiment since 2005. Some 30 military schools, such as the one in Volgograd, have opened in the country. Strapping fellows, in papakhi (the traditional black Astrakhan hats), now patrol the streets of Moscow and Krasnodar to prevent trouble and acts of blasphemy against shrines. They replace the police in this paradoxical land where the "hierarchy of power" coexists with disintegrating state institutions (police, army, justice) sapped by inefficiency and corruption.

As part of the tsarist army the Cossacks pursued Napoleon's forces across Europe, finally camping on the Champs Elysées in 1814. But during the civil war, which followed the 1917 revolution, they were divided, Reds pitted against Whites. In the early 1930s the triumphant Bolsheviks turned on the Cossacks, who seemed at odds with dreams of a "new man". They were liquidated, along with the kulaks. During the second world war Stalin reinstated Cossack cavalry units, but when peace returned they were again forgotten.

For the past 20 years Russia's leaders have been searching for a new "national idea". With the fall of communism, they wanted to give new impulse to the country, torn between embracing the outside world or withdrawing within its borders. Since the start of his third term as president, Putin seems to have adopted the traditional tsarist line, first expressed under Nicholas I, that promotes "orthodoxy, autocracy and nationality".

Much as his reactionary predecessor, Putin relies on officialdom, the church and the security services to govern. This fits well with Cossack patriotism. "Russia is like a mother, an invaluable gift from God and above reproach," Nikolaevich says. Putin's portrait hangs in every classroom, alongside the Russian flag and the words of the national anthem.

According to Stratulat, a former Soviet air-force pilot, the return to values such as "spirituality, morality and patriotism" is good for the country, which is still recovering from the chaos that followed the collapse of the Soviet Union. "The children who are boarders here would spend their time in front of a computer or TV at home with their parents. Some belong to problem families, with feckless, alcoholic parents, so they're better off here," he explains. "We try to give our pupils a sense of brotherhood. They will leave school as law-abiding citizens, profoundly attached to God and their homeland."

• This article appeared in Guardian Weekly, which incorporates material from Le Monde