Host Russia finished the Winter Games with 32 medals - 13 gold, 11 silver and nine bronze - and the 40,000 people on hand at Fisht Olympic Stadium for the closing ceremony were treated to a visual extravaganza that featured tributes to literary greats Leo Tolstoy, Fyodor Dostoyevsky and Alexander Pushkin, the music of Sergei Rachmaninov and the dancing of the Bolshoi and Mariinsky ballets on the shores of the Black Sea.
A recreation of Marc Chagall's village in the form of a globe turned upside down, a military drum band and a 62-piano ensemble on the stage were among the highlights of the closing ceremony.
The ceremony even poked fun at the glitch that occurred during the opening ceremony Feb 7, when performers failed to open the 5th Olympic ring on time.
The snafu was one of the most talked about things about the opening ceremony, going viral on the internet.
The Russian team was greeted with thunderous applause as it entered the stadium in the traditional parade of athletes from around the world in recognition of a performance that shattered not just the medal counts of Russia but of the old Soviet Union.
President Vladimir Putin and Prime Minister Dmitry Medvedev looked on as the Sochi Olympic Games, which cost Russia $50 billion, making them the most expensive in history, came to a close.
Sochi's mayor passed the Olympic flag to the mayor of the South Korean city of PyeongChang, which will host the next Winter Olympics in 2018.
The closing ceremony ended with a sea of flowers on the stadium's field and a huge fireworks display.