ONLY the call to prayer disturbs the morning air in the small Dagestani village of Novosasitli. Dogs do not bark here. All “unclean” animals have been exterminated. Apart from an occasional counter-terrorist raid, life is quiet. People leave their houses unlocked; there has not been a theft for years. A few weeks ago two women were killed—but they were fortune-tellers, or, according to local men, witches.

Most women wear the hijab. Alcohol is forbidden, polygamy common. Officials rarely come by, but life in the village is more orderly than in much of the rest of Dagestan. The locals have built a school extension for the growing number of children. Some of the money came as a zakat—a mandatory charitable contribution by the better-off to the poor, as required by the Koran. Disputes are settled by imams.

The village is home to Abdurakhim Magomedov, a charismatic spiritual leader of Islamic fundamentalists and the first translator of the Koran into the local language. “Fifteen years ago, only half the people in Novosasitli wanted to live by sharia law. Today everyone in the villages wants it,” he says. To achieve this, he adds, Dagestan needs to be free.

Last summer, after a few young women were kidnapped from the village, a community group set up a checkpoint and a night watch. But last month a military truck with ten gunmen came and smashed the checkpoint. If this was an attempt to draw Novosasitli into Russia's orbit, it achieved the opposite, increasing the tension that is tearing apart not only Dagestan but the whole north Caucasus—and, with it, Russia.

Russian rule has always been tenuous there. The territory, which stretches from the Black Sea to the Caspian, was colonised late and was never fully integrated into Russia's empire. Its Muslim peoples enjoyed considerable autonomy, both religious and cultural, until the Bolsheviks took over—whereupon the Caucasus was so modernised and Sovietised that when the Soviet Union fell only Chechnya declared its independence.

Two wars later Chechnya is relatively stable under President Ramzan Kadyrov, a former rebel whose patron is Vladimir Putin, Russia's prime minister. Grozny, Chechnya's once-ruined capital, is now a surreal place boasting several skyscrapers, the largest mosque in Europe, chandelier-lit streets and a Putin Prospect. The president enjoys something of a personality cult: official licence-plates carry his initials, and banners outside schools thank him for “taking care of our future”. Yet Chechnya is virtually a separate state, where women must wear headscarves in public and the sale of alcohol is restricted.

Violence has spread from Chechnya to other north Caucasus republics and beyond. Outsiders notice it only when suicide-bombers blow themselves up on the Moscow metro or at the capital's international airport. Yet parts of the north Caucasus are in a state of simmering civil war. Statistics are unreliable, but by the estimates of Memorial, a human-rights organisation, at least 289 Russian soldiers and policemen were killed last year and 551 wounded. About the same number died in 2009—more than Britain has lost in Afghanistan over the past ten years.

On paper, all five predominantly Muslim republics (Dagestan, Chechnya, Ingushetia, Kabardino-Balkaria and Karachaevo-Cherkessia) are part of a single administrative district. On the ground, however, they are separated by borders and checkpoints fortified by sandbags and machineguns. Crossing from one republic to another feels like crossing a national frontier. Taxi-drivers from Dagestan prefer not to venture into Chechnya.

Each of the republics has its own political set-up and is unhappy in its own way, but the root of the problem, say experts, is shared: the de-legitimisation and crumbling of the Russian state and its inability to rule by law. In much of the north Caucasus corruption has eroded the very basis of the state, which performs almost none of its functions and is seen as a source of disorder and violence rather than security.

This also holds true in the rest of Russia, but the north Caucasus has a strong alternative to Russia's political system: Islam, which now unites all the Muslim republics. Whereas the first Chechen war in 1994 was fired by nationalism and separatism, the second war (which echoes still) had a strong religious dimension. The leader of the Islamist rebels, Doku Umarov, has proclaimed himself emir of north Caucasus.

Sufis v Salafis

The failures of the Russian state and the compensating role of Islam are particularly noticeable in Dagestan, the most religious, populous and complex of all the north Caucasian republics. It is double the size of Chechnya and consists of several dozen ethnic groups, most with their own language.

The conflict in Dagestan, however, is not between ethnic groups but between Sufism, a traditional form of Islam which includes local customs and recognises the state, and Salafism, which rejects secular rule and insists that Islam should govern all spheres of life. As Alexei Malashenko, an expert on Islam at the Carnegie Moscow Centre, puts it: “The goal of building a pure Islamist state might be a Utopia, but the struggle for it can be infinite.”

Salafism started to spread in Dagestan only after the Soviet collapse, partly as a reaction to the tame, officially recognised local version of Islam. (Raising a vodka shot to Allah used to be standard practice in the Caucasus, says Mr Malashenko.) Tension escalated in the late 1990s when Islamist radicals took over two villages in Dagestan, declaring sharia law and chasing away both local government and the police.

Sufi leaders, who had exercised a virtual monopoly over religious life in Dagestan and enjoyed official backing after the end of Soviet rule, saw the rise of Salafism as a threat. Local officials, many of whom were Sufis, started to put pressure on Salafis, forcing their spiritual leader out of Dagestan. In August and September 1999 Shamil Basayev, the leader of the Chechen fighters, and Amir Khattab, who was born in Saudi Arabia, led two armies into Dagestan, triggering the second Chechen war.

“I told Basayev that Dagestan was not ready for jihad, but he did not listen,” says Mr Magomedov, the Islamist leader. Indeed, most people in Dagestan resented the intruders. They treated the Russian army as a liberating force, and backed it with local volunteers. Sharia villages were cleared of radicals and the parliament of Dagestan passed a law forbidding extremism and Wahhabism, although it did not define either.

Sufi leaders used Basayev's invasion to see off Salafis as a whole. In effect, the state took sides in a religious war. Wahhabism became synonymous with terrorism. Anyone who practised Salafism was outlawed by the authorities. Torture, disappearances and killings became commonplace. Bearded men from villages such as Novosasitli were driven to Chechnya by federal forces, only to be found dead a few days later. In Novosasitli soldiers publicly tore up copies of the Koran.

“The terror was conducted by the state, and in response [the insurgents] turned to counter-terrorism,” says Mr Magomedov, who himself has been arrested and tortured several times. His views are moderate compared with those of radical Salafis, who blow up shops selling alcohol and plant bombs on beaches. He does not condone the bombing at Moscow airport because it does nothing to advance Islam. But he has nothing against attacks on the army or security services, if they are engaged in a war against Islamist fundamentalists.

Although the insurgents use Salafism as their ideology, not all Salafis are rebels. The number of insurgents is estimated by experts at 500 men, plus 600-800 part-timers, across the whole north Caucasus. They draw their main strength not from numbers or even ideology, but from the failures of the Russian state and its injustices. Attacks on policemen and the army in Dagestan have doubled in the past year. They are met with popular indifference, if not approval.

Leaving Friday prayers in Grozny

Salafis have adopted the rhetoric of human rights and built up a mood of political protest, whereas the Sufis have been tainted by their association with a brutal and corrupt state, explains Nadira Isaeva, the 32-year-old Salafi editor of Chernovik, an independent newspaper. “The Sufi leaders have no active civil position,” she says, “but they control vast financial assets, including tourist companies that sell haj tours to Mecca.”

The result of all this has been a surge in Salafism. Ten years ago only 10% of people in Novosasitli were Salafis. Today at least 50% are, and almost all the young embrace it. Many of them have studied in Egypt and Syria, and speak Arabic.

A country of strongmen

A new local government appointed by the Kremlin last year tried to ease pressure on the fundamentalists, allowing them to practise Salafism without being arrested for it. Rizvan Kurbanov, the deputy prime minister in charge of security, says his first step was to visit a Salafi mosque and talk to its spiritual leaders, including Mr Magomedov. But the government is worried about giving Salafis equal access to services or allowing them political representation, partly for fear of a backlash from mainstream imams.

Trying to claw back some credibility, the government has cracked down on casinos (which operated openly despite a previous ban) and set up a commission to help former rebels adapt to a peaceful life. It has even talked about an amnesty for those who are willing to lay down their arms. But as Mr Magomedov argues, the people who need an amnesty are those who are accused of extremism simply because of their faith, not their actions.

Examples abound. Last year a group of young bearded Salafi men drove to the mountains for a picnic, stopping on the way in a small town where they were attacked by local Sufists. The police, many of whom are Sufis, joined in, beating them up so brutally that one of them died. “While the authorities are trying to entice former rebels back to normal life, their own subordinates are pushing another 100 into the hands of the rebels,” says Ms Isaeva.

Police violence is not restricted to the fight with the Islamists, either. A 14-year-old boy was tortured and crippled by the police after being wrongly accused of stealing a drill. Sapiat Mag Omedova, a petite female lawyer who was thrown out of a police station and ended up with concussion, has been accused of attacking four burly policemen. None of these cases led to police bosses being punished. The police force, which is 20,000 strong, is barely controlled by the Dagestani government.

Mr Kurbanov says it is not in his power to fire a police chief, since both the police and security services answer to Moscow. That is not the only reason. Unlike Chechnya, Dagestan is a state of semi-autonomous districts controlled by local strongmen who are backed by a local police chief and often by an imam. Said Amirov, the wheelchair-bound mayor of Makhachkala, who has survived at least 15 assassination attempts, is considered to be as powerful as the president of the republic. An attempt by the president or his team to cleanse a particular police department is seen as a declaration of war against a powerful vassal.

The balance between regions and clans is fragile. Saigidpasha Umakhanov, the mayor of Khasaviurt, a town close to the Chechen border, is a charismatic strongman who led local armed resistance to Basayev in 1999. “There is no one in the republic who could dislodge me,” he boasts. “Only the president of Russia.” If he himself were to die, “at least I would die like a real man—not like some bastard with a bowed head.” The prospect of death is real enough: a vast computer screen on his desk displays input from multiple CCTV cameras.

As a powerful regional leader, Mr Umakhanov sneers at Magomedsalam Magomedov, who was appointed Dagestan's president without consultation with local strongmen. “He is not an independent player. The oligarchs in Moscow interfere in his decisions.” The scrapping of regional elections by Mr Putin in 2004 has eliminated peaceful channels for political competition, only making places like Dagestan more explosive. Mr Umakhanov says the only way out of this paralysis is direct elections. He is not alone in feeling that way. Most Russians want to elect their regional governors. This is precisely what the Kremlin fears, as it would mean the loss of guaranteed political support from puppets in the regions.

Unable to offer any unifying idea or the rule of law, the Kremlin tries to compensate with injections of money. Corruption is so rampant that, at best, the funds get siphoned off; at worst, they are used for terrorism. The Dagestani economy is 80% subsidised by the Russian government, but there is little to show for it apart from a few seaside villas and lavish weddings for the rich—at which guests may sport gold-plated revolvers bulging in their jeans.

As for the rest of the Dagestanis, they are left with potholed roads, derelict farms and factories, a polluted sea and a grim landscape dotted with houses half-built or half-ruined. Free education and health care are myths. The rate of TB is one of the highest in Russia. Jobs, exam grades and university diplomas are all for sale.

In this region, Russian identity has been hollowed out. As one young man puts it, “The only thing that makes me Russian is a note in my passport. I can't get a job in Moscow or even a mortgage, because I come from Dagestan.” Radicalisation of young people is increasing, both in the north Caucasus and in Moscow. The main slogan of the ultra-nationalists who rioted in Moscow recently was “Fuck the Caucasus”. Radicals in the Caucasus feel the same way about the Russian state.

Mr Putin came to power pledging to fight the centrifugal forces in Russia. After more than a decade of his rule, the risk of disintegration is greater than ever. The Kremlin has no strategy to prevent it. And the biggest threat to Russia's territorial integrity comes not from Dagestan or any other part of the north Caucasus, but from the Russian state itself. As a young man in Novosasitli remarks: “There is no future for Dagestan inside Russia now because Russia itself is fraying at the seams.”