STAVROPOL, Russia -- Outside this city's police headquarters on a recent night, a priest in a purple velvet hat and gold stole moved from one man to the next, offering a cross to be kissed and drenching their faces with holy water from a long brush.
And so began another night of law enforcement as Cossacks, the fierce horsemen who once secured the frontier for the Russian empire, marched out to join the police patrolling the city.
In his third term, President Vladimir V. Putin has offered one clear new direction for the country: the development of a conservative, nationalist ideology. Cossacks have emerged as a kind of mascot, with growing financial and political support.
The Kremlin is dipping into a deep pool of history: Cossacks are revered here for their bravery and pre-modern code of honor, like cowboys in the United States or samurai in Japan. But their legacy is bound up with battle and vigilante-style violence, including campaigns against Turks, Jews and Muslim highlanders.
These days men in Cossack uniforms are making appearances all over Russia, carrying out blustery raids of art exhibits, museums and theaters as standard-bearers for a resurgent church. But here on Russia's southern flank, the Cossack revival is more than an idea. Regional leaders are granting them an increasing role in law enforcement, in some cases explicitly asking them to stem an influx of ethnic minorities, mainly Muslims from the Caucasus, into territory long dominated by Orthodox Slavs.
"We've lived cheek to cheek with them, and sometimes we fought with them, and we probably understand them better than a Russian from Moscow," said Staff Capt. Vadim Stadnikov, head of security for the Terek Cossack Army, whose office displays a portrait of Czar Nicholas II. "They respect strength here."
"With police it is a short conversation -- you committed a crime, here's the punishment," he said. With Cossacks involved, he added, "There is a prophylactic effect, a kind of education. They come here. Take this group of young people. Explain to them the traditions of the Orthodox, Slavic, Cossack people of the city of Stavropol. What our rules are. How we live here."
A series of violent episodes have underlined the potential for trouble in this incendiary and heavily armed part of Russia. This month, a Cossack chieftain was fatally shot trying to arrest a drunken man who had taken hostages in the neighboring region of Krasnodar. At the chieftain's funeral, Cossacks in crimson coats, carrying leather whips and sabers, streamed after a riderless horse, a sight that could have dated from the 16th century.
Afterward, a top official said the time had come for the state to allow Cossack patrolmen to carry traumatic guns, nonlethal weapons that can inflict severe injuries at close range -- a proposal that has been endorsed by the governors of Krasnodar and Stavropol.
"Some human rights activists, some ill-wishers, talk a lot about whether it's necessary or not necessary," Nikolai A. Doluda, chieftain of the Kuban Cossack Army and a deputy to the governor, told Russian television. "This terrible, frightening event underlines the fact that it is necessary."
Historians still argue about who the Cossacks were -- descendants of escaped serfs or Tatar warriors, an ethnic group in their own right or a caste of horsemen. They played a crucial role in colonizing the south for the Russian empire, and later turned on peasant and worker uprisings, defending the czar.
The Bolsheviks nearly obliterated them, deporting tens of thousands in a process they called "de-Cossackization," but the image of the Cossack, wild and free, was a permanent part of the Russian imagination.
When Tolstoy sat down to write his classic novel "The Cossacks," he set it near present-day Stavropol, where the Terek River divided the Muslim-populated mountains from the steppes, which were Cossack country. In a scene taught to generations of schoolchildren, a young Cossack spots a Chechen swimming across the Terek disguised as a log and shoots him.
The notion of an ethnic dividing line is widely accepted to this day, but it is running up against demography. Muslim ethnic groups in the Caucasus have a high birthrate, and Russians are abandoning the steppe. About 81 percent of Stavropol's population is ethnic Russian, but that share has been shrinking for decades, the International Crisis Group has reported.
This rapid change is unsettling to ethnic Russians in Stavropol, who sometimes refer to the newcomers as "shepherds." Gennady A. Ganopenko, 42, said he grew up in a city so homogeneous that "the sound of a non-Russian language was grounds for a brawl."
"Earlier, this was the gate to the Caucasus," he said. "We opened the gate, and then the gate came off the hinges."
The Cossack revival seeks to slow this trend. Last summer, Aleksandr N. Tkachev, the governor of the Krasnodar region, to the west, took aim at his neighbors in the Stavropol region, saying so many Muslims had resettled there that Russians no longer felt at home. The region, he said, no longer served its traditional function as an ethnic "filter."
To crack down on illegal migration, he announced the creation of a salaried force of 1,000 Cossack patrolmen, which -- he explained in a speech to law enforcement officers -- would not be restrained by the law as the police are. He put it this way: "What you cannot do, a Cossack can."
Stavropol's leaders bridled at the speech, but it struck a chord with nationalists. Among them was Boris V. Pronin, chieftain of the Romanov-Cossacks, one of the many Cossack associations in Stavropol not officially registered with the government. Like many people in the region, he said youths from the Caucasus had begun to behave too freely in Stavropol.
"It's as if I came to your house, slapped you in the face and said, 'Tonight, I'm going to sleep with your wife,' " he said in an interview.
Mr. Pronin has bright blue eyes and the battered nose of a boxer, and he wears a handsome, traditional Cossack uniform. After an ethnic Russian man was stabbed in a brawl with Muslim youths from the Caucasus this winter, he lashed out at regional law enforcement for acting too slowly to detain his assailants. He advocates the creation of a Cossack guard unit with powers equivalent to those of the police, warning that immediate action is needed.
"If a person has a cancer and metastasis has begun, if a professional doctor doesn't take care of this metastasis, he will die," he said. "It is the same with society. If there is already metastatic cancer on the territory of Stavropol region, one has to take appropriate preventive measures."
The rise in official support for Cossacks is troubling to some Muslims, though their official representatives are careful about saying so. An exception was Zainudin Azizov, who, on a recent morning, barreled past herds of sheep and over acres of gray-brown steppe in a Mercedes S.U.V. while music wailed from its dashboard.
"One class is turning out to be somehow privileged," he said of the Cossacks. "Why don't they support the whole Russian people? Why are they supporting only this small class?"
Mr. Azizov represents Dagestani families who now dominate in villages at the far-eastern edge of the Stavropol region, and he is particularly irritated by a plan to grant free land in areas like his own to Cossack families being resettled, creating a kind of buffer zone of ethnic Russians. Nor does he like the idea of Cossack patrolmen receiving salaries from the state. While some of the local Cossacks are old friends, he said, others are "skinheads."
"They join the Cossacks, but then they behave like nationalists," he said. "They have support from the region, from Moscow. They feel they can do anything they want, that tomorrow they will have protection."
Indeed, the Cossacks who set out to patrol Stavropol on a recent night felt that they were part of a rising tide. Andrei Kovtun, 29, recalled the ribbing he got from his former colleagues in law enforcement when he first patrolled with the Cossacks, who do not have the right to demand documents, carry weapons or detain people.
Still, on one of his early calls -- separating two groups of brawling men -- he understood that a Cossack's presence had a psychological effect. "Are you a cop?" someone asked him, and when he answered, the room went quiet. Mr. Kovtun understood why: Policemen are bound by the law.
"A complaint cannot be made against a Cossack, and a Cossack cannot be fired," he said. "They know Cossacks are free, and will not think too much about how to take a violator to a police station, but will simply give him a whipping. This is what people are afraid of -- that a Cossack will punish the culprit in the old, traditional but fair fashion."
"However," he added hastily, "first we should always stop it by force of persuasion."
This article originally appeared in The New York Times.