But, remarkably, the federal army announced yesterday that it had repulsed the Muslim militants who had invaded the southern Russian region. The battered prestige of the military got a huge boost after a conflict in which, for once, Russian soldiers had played the good guys.
The turning point in the fighting came on Tuesday when the army retook the strategically important villages of Tando and Rakhata. Yesterday, commanders were able to announce the liberation of all six villages of the craggy Botlikh district, seized on 7 August in a surprise raid by fundamentalists from over the border in Chechnya.
Hundreds of rebels had been killed, said Colonel-General Viktor Kazantsev, although he admitted that others had made a get away, and not before laying lethal minefields behind them. The official death toll among federal forces was put at 59, with 210 injured.
Compared with the terrible losses of the 1994-96 war between Russia and Chechnya, that was light, indeed. The policies of the new Prime Minister, Vladimir Putin, appeared to have been vindicated.
Russians had been sceptical when they heard him promise to sort out Dagestan in a matter of a fortnight. His words seemed to echo the boast of the former defence minister, Pavel Grachev, that Russia would crush Chechnya's separatist uprising within hours. Two years later, the army was forced to make a humiliating retreat, leaving Chechnya in effect independent. On the ruins grew a rogue state in which kidnappers held sway.
On this occasion, the battle against extremists beyond the control of the moderate Chechen leader, Aslan Maskhadov, has been won. However, experts say it is unlikely we have heard the last of the rebels.
The fear is that we are seeing the onset of a long conflict on the border of the Christian and Muslim worlds. Western commentators, who in the past have criticised Russian behaviour in the Caucasus, are arguing that Moscow deserves more understanding.
The short conflict in Dagestan differed in important ways from the war that Russia pursued, with multiple violations of human rights, against Chechnya. By shelling Grozny, the Chechen capital, and killing thousands of civilians, it tried to impose its will on a more-or-less homogeneous population, united in the desire for independence. In Dagestan, Moscow reacted to an attack on a region with more than 30 ethnic groups, most of which seemed to want to remain within the Russian Federation.
The invaders, led by the Chechen warlord Shamil Basayev and Khattab, a fighter believed to be of Jordanian origin, declared they were pursuing a Jihad, or holy war, for Dagestan's independence.
But the fundamentalists were not welcomed by Dagestanis, many of whom took up arms to help the federal forces.
Critics of Moscow's Caucasus policy say that the Kremlin has bungled badly in the past and brought many of today's problems on itself. But in Dagestan, Moscow seemed to have learnt from its mistakes.
Certainly in terms of military strategy, the Kremlin handled Dagestan differently from Chechnya, making more use of air power and trying to avoid civilian casualties.
Some argue that Russia does not need the Caucasus. Moscow fears the loss of southern regions could set a precedent for the disintegration of the whole country. But in the long term, for Russia to keep Dagestan, it must address the poverty in the mountains, where 80 per cent of the men are unemployed.Reuse content