Dancers perform against a backdrop of inflatable onion domes during the opening ceremony of the Sochi Winter Olympics. Photograph: Ryan Pierse/Getty

In a buttoned-down black overcoat with a fur collar, Vladimir Putin smiled a big smile as the lights went down in the Fisht Stadium. Putin himself may have been restricted to an uncharacteristic peripheral role by the Olympic charter, which only allowed him to say one sentence, announcing the official opening of the Games. But the triumphant smile on his face was worth a thousand words. For him, these are the biggest two weeks of his political career.

Misfiring Olympic ring aside, the games got off to an impressive start with an opening ceremony that took a dreamy and sumptuous look at Russian history, mounted on a scale that matches the preparations for the Games themselves.

The official opening ceremony came after another warm and sunny day in Sochi, and was preceded by an hour of entertainment for those in the stadium, not shown to television audiences either in Russia or abroad. In a somewhat surreal turn of events, much of the hour had been given a – perhaps unintended – gay theme. The competitors' seats were painted in rainbow colours, the first song was a rendition of Queen's We Are the Champions, followed by the faux-lesbian pop duo tATu, who sang one of their hits from a decade ago, Not Gonna Get Us.

Tatu came on stage wearing schoolgirl outfits and holding hands. Although both women later said that the lesbian act was thought up by their manager as a PR stunt, they have remained supporters of the gay community in Russia. The ceremony's director said that the reason Tatu were chosen was that they are one of the few Russian bands that are known internationally, and it was their music that was played when the Russian Olympic team entered the arena.

‘Hero girl’ rises above the stage. Photograph: How Hwee Young/EPA

But the centrepiece of the evening was an elegant, mesmerising and occasionally surreal journey through Russian history, directed by the head of a state television channel, Konstantin Ernst. It began with a psychedelic panorama of cupolas and swirling samovars, before we saw Russia's modernising tsar, Peter the Great, emerge from the sea. From there we had a brief ballet interlude with War and Peace, and then we were into the Soviet period.

There followed what might be the most alluring representation of the Soviet state ever, as shiny vintage limousines sped through the stadium, art-deco tinged skyscrapers burst from the ground and happy workers toiled in unison, while the sharp, abstract angles of 1920s constructivism gave way to a vast hammer and sickle, which converged on the centre of the arena from opposite ends.

The utopianism of the 1920s and industrial zeal of the later Soviet years were visualised in spectacular fashion. Of course, there was no role for Joseph Stalin, nor for the purges of the 1930s and the Gulag system, and some may have been offended by what looked like the glamorisation of a system under which so many people suffered. But this was a celebration, and so the choice was either to ignore the period or pick out its aesthetically impressive aspects.

Indeed, the whole ceremony was surprisingly devoid of the nationalist pomp that often accompanies forays into Russian history. The only leader depicted was Peter the Great, and there was not so much as a mention of the great patriotic war, as the second world war is known here, which has become a national unifying idea under Putin. This was an aesthetic portrayal of Russian history rather than an ideological one. Ernst himself, the ceremony's director, said he wanted to show the world a genuine picture of the country and its people: "the real Russians, untainted by decades of propaganda and the cold war".

Children in Sochi watch a live relay. Photograph: AP

There are 88 nations involved in these Winter Games – a record number – and their entrance through a hole that opened up in the floor was fast-paced, and a surprisingly entertaining fashion journey, from the hip and nonchalant French sporting grey jackets, to the frankly bizarre four-person Bermuda team in scarlet shorts.

It was also a good chance to keep tabs on who was watching from the stands. Putin himself stood between the IOC president, Thomas Bach, and Irina Skvortsova, a Russian bobsleigh athlete who nearly died after an accident in 2009 but has now recovered. State TV showed prime minister Dmitry Medvedev, currently considered to be out of favour with Putin, snoozing.

There were few European leaders at the ceremony, but it was attended by China's Xi Jinping and Turkey's Recep Tayyip Erdogan among others, as well as most leaders of post-Soviet states. These included Belarusian dictator Alexander Lukashenko, who as always, was sitting with his nine-year-old son Kolya. Also present was Turkmenistan's president Gurbanguly Berdymukhammedov, who has created a bloated personality cult around himself and may have been confused to be in a stadium not full of people chanting his name.

Ukraine's president Viktor Yanukovych, who is facing political crisis at home, was pictured sitting next to an empty seat, perhaps meant for the EU.

The speeches that ensued after the show had more of an ideological bent to them. Bach again got a dig in at international leaders who have boycotted the games, while the head of the organising committee, Dmitry Chernyshenko, said Sochi would "break stereotypes, and show a new Russia to the world".

This has been the dominant trope of the speeches of all top Russian officials when talking about the Olympics – that they should help to provide a new image of Russia, which they feel has a bad image not because of myriad real issues, of which the new gay law is just one, but due to some kind of Russophobic conspiracy.

After Putin declared the Games open, an octet of assorted Russian dignitaries ranging from conductor Valery Gergiev to Valentina Tereshkova, the first woman in space, carried the Olympic flag to the podium, and raised it with the Russian tricolour as Anna Netrebko sang the Olympic anthem. Then it was time for the torch relay, where five leading athletes circumnavigated the stadium, before it was lit.

Just in case the evening was feeling bizarrely bereft of controversy, among the five was Alina Kabayeva, the rhythmic gymnast long rumoured to be Putin's mistress. True, she is an Olympic gold medallist, but she is by no means one of the five most successful Russian sportspeople, so an element of scandal is inevitable. But the crowd didn't care, cheering on the torch as it lit the giant flame outside the stadium.