Sochi security clampdown could store up trouble
Athletes from around the world will compete in Sochi, hoping for a gold medal. At the same time militant groups are making gains - with a boost in publicity because of the Games.
President Vladimir Putin is proud of the Winter Olympics - but not everybody in Russia shares his enthusiasm.
He has billed them as a showcase for the new Russia - and spent lavishly. A road and railway that was built in the area, for example, cost $8.7bn (£5.3bn).
For that amount workers could have paved the 31-mile (50-km) path in Louis Vuitton bags, according to Russia's Esquire.
Mr Putin's efforts to promote the Games are a boon for local builders, or at least corrupt local officials. They have also made Sochi a target for militants.
Crackdown on Dagestan
"The personalisation of the Games presents a red flag for the bull," said Juan Zarate, a former US assistant treasury secretary, last week at an event hosted by the Center for Strategic and International Studies in Washington.
In July leaders of a militant group, Caucasus Emirate, released a video, telling supporters to target the Olympics.
Nightmare scenarios of an attack have threatened to overshadow the Games themselves - and moreover have had an impact on security in the region.
Militants in the Russian Caucasus republic of Dagestan, which is about 400 miles from Sochi, have over the years attacked police and army forces, hoping to reach their goal - the creation of an Islamic caliphate.
It is the site of the deadliest conflict in Europe, according to an International Crisis Group report. Tamerlan Tsarnaev, a suspect in last year's bombing of the Boston Marathon, spent several months there in 2012.
Russian authorities have tried to tamp down violence in Dagestan and capture militant leaders who may be planning attacks. Yet human-rights researchers say the authorities have only stirred up more trouble.
Violence had decreased in recent years - before the Russian authorities decided to crack down on the region. In 2010 the Dagestan government established a commission in order to rehabilitate insurgents - rather than just lock them up.
Meanwhile, moderate fundamentalists - those who condemn violence and do not want to wage war on Russia, were accepted in a way they had not been in the past. They were, for example, no longer targeted by security forces.
In turn these moderate Islamists had a positive influence on those around them, according to human-rights researchers, encouraging peaceful solutions to local conflicts and helping to avoid gunfire.
Overall violence dropped, according to an independent news service called Caucasus Knot.
In 2012 more than 63 civilians died because of gunfire, explosions and other militant acts. In the previous year more than 128 civilians were killed.
Then the liberal policies ended. In April authorities conducted a sweep of a mountain village called Gimri, according to researchers with the International Crisis Group.
People were taken to police stations and interrogated. Some have been told to sign documents stating they would not leave Dagestan during the Olympics.
"They tell them that the Games are for the whole country, but not really for them," said Ekaterina Sokirianskaia, a project director with International Crisis Group, speaking on the phone in Moscow. "This is very humiliating for them."
Some may turn to militant groups. On a broader scale the Games have helped to strengthen the militant groups - or at least helped to promote their brand.
Publicity for militants
Few people outside of the region knew about Caucasus Emirate before the Games. Now that its leaders have encouraged violence against Sochi, however, they have expanded their reach.
The US National Counterterrorism Center's Matthew Olsen told lawmakers this week that the biggest threat to Sochi comes from the militant group.
Meanwhile Russian security officials are securing the city for the Games.
"To the extent that the Games are perceived to be on lockdown - that unfortunately is a success for these groups," Mr Zarate said.
"Sochi may not be the end. For global jihad this may be the beginning of a new chapter."