IT WAS always a question of when rather than if. Russia has been bracing itself for an attack since July, when Doku Umarov, the self-proclaimed emir of the northern Caucasus and a Chechen terrorist leader, pledged to disrupt the Sochi winter Olympics and lifted a moratorium on civilian targets in Russia that he had imposed in the wake of anti-government protests in December 2011. Yet, the audacity and the deadly choreography of the twin suicide bombings in the southern city of Volgograd on December 29th and 30th stunned the country.

The first bomb went off at a railway station, one of the most closely guarded places in the city; less than 24 hours later, the second ripped through a trolleybus in the morning rush-hour within a mile and a half of the first one. The death toll, so far, is 34 people, including two children. Another 50 people remain in hospital, some in critical condition. This was the third attack in Volgograd in three months. In October a female suicide bomber killed six people on a Moscow-bound bus.

The choice of Volgograd is not accidental. Once known as Stalingrad, it was a symbol of Soviet resistance during the second world war. But it is also an important transportation hub and 400 miles away from Sochi where Russia will host the winter Olympics in six weeks.

The attacks have brought back vivid memories of the apartment bombings in Moscow and other Russian cities in September 1999. The ensuing war in Chechnya, the second in five years, consolidated the country around Vladimir Putin, a former KGB officer who famously promised “to rub out [Chechen insurgents] in shithouses”. Mr Putin celebrated the new year of 2000, and the beginning of his rule, in a helicopter flying over Chechnya. Fourteen years later, he was again in the air flying to Volgograd to deal with the lingering consequences of that war.

Mr Putin used the Chechen war to justify rolling back the autonomy of Russia’s regions as well as civic freedom. He relied on present and former military and security men, who accumulated enormous political and economic power and have done little to integrate the northern Caucasus more closely into Russia. While Chechnya was pacified, the conflict spread to other republics and degenerated into a simmering civil war. As International Crisis Group (ICG), a Brussels-based NGO, notes in its latest report, the conflict in the northern Caucasus is the most deadly in Europe: at least 700 people were killed there in 2012.

Over the past two decades, the crisis in the northern Caucasus has mutated from a fight of separatists into a global jihad aimed at establishing Islamist sharia law across the region. Ekaterina Sokiryanskaya, a Caucasus expert at ICG, notes that unlike previous suicide bombings, which were carried out by Chechen women seeking to avenge their killed relatives, the recent attacks are the work of ideologically motivated jihadists—some of them ethnic-Russian men—who are harder to identify and detect than women in headscarves. One of the Volgograd bombers was apparently an ethnic Russian man who converted to Islam.

During a meeting with his security chiefs in Volgograd at 6am on January 1st Mr Putin condemned violence against civilians, stressing that unlike terrorists “Russian special units always do their utmost in the course of special operations to protect civilians, women and children in the first place.” Civil groups that monitor human-rights abuses in the northern Caucasus say that neither side is concerned about civilian lives. Moreover, they argue, it is precisely the failures of the Russian state and the indiscriminate use of violence by the security services that had fuelled radicalisation and the spread of Islamist fundamentalism in the region.

Ms Sokiryanskaya says that in preparation for the Sochi Olympics the Russian security services have brutally clamped down on any form of legal activity by Salafists, who follow a fundamentalist form of Islam. In Dagestan, even the modest attempts a few years ago by state authorities to establish a dialogue with moderate Salafists have been abandoned: their mosques and schools have been closed down and their spiritual leaders harassed.

“We will remain confident, tough and consistent in our fight to destroy the terrorists completely,” Mr Putin said in his new year’s speech. For all the steel in his voice, his words did not inspire confidence.