SOCHI/MOSCOW - Russian President Vladimir Putin has staked his personal and political prestige on February's Winter Olympics in the city of Sochi, yet despite the $50-billion price tag the Games could still be an embarrassing flop.
If all goes to plan, the costliest Games in history will be a showcase for Russia's achievements under Putin, the vindication of a six-year vanity project on a truly Soviet scale.
But his dream could yet be shattered: if venues on the subtropical Black Sea are not ready on time; if protests break out over a new Russian law that critics say targets gay rights; if Chechen or other Islamist militants attack the Games.
Four months before the Games open on Feb. 7, cranes still tower over muddy construction sites, freshly laid pipes lie exposed to the weather and walkways are churned up around them. At ski resorts above the seaside city, huge segments of metal piping and cable lie strewn around near hotels.
The blow to Putin's pride and political standing would be immense if the Games fail because he has invested so much personally in what some see as the folly of turning a palm-lined summer beach resort into a 21st-century winter sports hub.
"He considers this project his baby," said Dmitry Chernyshenko, president of the Sochi 2014 Organising Committee.
Of all the projects Putin has undertaken since he was first elected president in 2000, few have borne his personal stamp so clearly. He flew in person to Guatemala in 2007 to persuade Olympic chiefs to award the Games to Sochi. He even addressed them in French and English, a rarity for the former KGB spy.
Some Russian organising officials call Putin team "captain". He seems to have revelled in the difficulties, building venues from scratch, persuading wealthy tycoons to fund construction and coping with floods and mudslides around Sochi last month.
When the ski-jump venue fell behind schedule, Putin not only fired a senior official but went on television with him to humiliate the unfortunate bureaucrat publicly.
After 14 years in power, Putin is looking far beyond the medal haul in Sochi. For him, a safe and successful Games will show the world how far Russia has come since the end of what US President Ronald Reagan called the "evil" Soviet empire. As he tries to burnish Russia's diplomatic and economic standing and rally domestic support after protests against his long rule, Putin wants to show Russia is a modern state capable of organising events on such a scale and restore national pride.
Such notions are central to his search for a national idea to unite the country behind his view of Russian achievements as well as his conservative values. For the two weeks of the Games, Putin knows the world will be passing judgment on Russia.
The cost of failure could be far-reaching. Just as securing the Games for Sochi in 2007 was seen in Russia more as a personal victory for Putin than a national triumph, a disappointing Games would be seen as a personal defeat.
Though his grip on Russia's elites and most media has made him seem invulnerable, a major calamity could encourage challenges ahead of an election due by 2018 - either from existing opponents, or from within the Kremlin establishment.
Some opponents hope the Games will have the opposite effect to the one Putin seeks, showing Sochi to be an empty "Potemkin village", a shabby mask for the lack of post-Soviet progress.
"The petty dictator will be humiliated for his bigotry and repression, as he should be," said liberal opposition leader and former chess champion Garry Kasparov.
Putin still has no serious rival in opinion polls and state media are sure to portray the Games as a success, come what may.
But the Internet is beyond the Kremlin's control and any failure could reinvigorate dissidents who took to the streets in protest against Putin but have been discouraged since his comfortable election victory 18 months ago.
The scale of Putin's ambition is also seen in the 65,000-km (40,000-mile) torch relay, the longest in history; it will go to the North Pole, to the bottom of the world's deepest lake and into space, where the crew of the International Space Station will take the torch - unlit - on a spacewalk.
Yet the grandiose ambitions seem a distant vision in Sochi itself as workers race against the clock to be ready in time.
The International Olympic Committee has given its seal of approval. But at first glance, Sochi appears far from ready for the more than 120,000 spectators and 5,400 competitors and support staff expected to attend the two weeks of spectacle. Power cuts are frequent, traffic jams block roads because of the construction work and not all the venues can be reached by public transport or road yet, residents say.
One employee involved in the preparations described chaos behind the scenes which belied the outer calm of Russian officials. He suggested that even if the infrastructure was ready, the organisation at facilities, public transport and media arrangements was likely to be disastrous.
"Unless there's a significant change of attitude, the Olympics are heading for an unprecedented meltdown," said the official, who declined to be identified.
Putin acknowledged last month that a few glitches needed ironing out and made clear he would put up with no mistakes.
Also problematic are possible protests over a law he signed this year banning the spread of "gay propaganda" among minors.
The Kremlin says the law is needed to protect children but critics say it could be used to prosecute anyone voicing support for homosexuals and to snuff out protests. Some see it as proof that Russian values under Putin are out of step with the West - and that Russia is moving backwards rather than forwards. Some hear echoes of the Berlin Olympics of 1936.
Stephen Fry, a British actor who speaks out for gay rights, has compared Sochi to Hitler hosting the Games after passing laws persecuting Jews: "Putin is eerily repeating this insane crime, only this time against LGBT Russians," Fry wrote of the fears of lesbian, gay, bisexual and transgender people.
Protests would embarrass Putin at a time when the world's eyes are on Sochi. But a crackdown by police could do even more damage to Putin's image than any demonstrations - not least as he will also be hosting the World Cup football finals in 2018.
Another threat to Putin's dream is the possibility of an attack by militants trying to carve out an Islamic state on the other side of the mountains, in the North Caucasus. He has already tightened security around Sochi, Cossack militia have been patrolling the streets and from Jan. 7 until March 21 travel into Sochi will be limited and public gatherings not connected with the Olympics banned.
The Games are being held on territory that was once the homeland of Circassians expelled in the 19th century. Islamist leaders say this amounts to performing "Satanic dances" on the graves of Muslims killed fighting Russian forces.
Security analysts say attacks cannot be ruled out entirely but are unlikely to overcome the tight layers of protection. "Security will not be noticeable. It won't be thrown in the faces of guests and it won't disturb guests and participants,"said Alexei Lavrishchev, a senior official in the FSB security forces, a successor to the Soviet KGB. But it will be there.
Alexander Valov, a Sochi blogger, says the city will be turned into a "concentration camp", reflecting discontent among local people that is given little coverage in Russian media. "In general, I'm ashamed that I live in this country," said a librarian who gave her name only as Darya.
Some are unhappy with being evicted from homes that were in the path of the bulldozers, even though most of the 1,500 families were resettled in modern accommodation. Others complain of damage to the environment, notably soil pollution from building work, or about low wages and poor conditions for migrant workers.
With costs already projected to be about five times the initial forecast, Putin also faces the risk of a backlash over allegations of passing contracts to favoured contractors.
"The absence of fair competition, cronyism ... have led to a sharp increase in the costs and to the poor quality of the work," opposition leader Boris Nemtsov said. "Only oligarchs and companies close to Putin got rich."
The Kremlin dismisses such allegations.
As the moment of truth approaches in Sochi, the pressure to put on a good show is mounting. And as Putin's words on his return from winning the Olympic bid six years ago in Guatemala made clear, this is not just about sporting spectacle:
"This is, without doubt, not just a recognition of Russia's sporting achievements," he said. "It is, beyond any doubt, a judgment of our country."