The Winter Olympics closed Sunday night with all the elegance of a Fabergé egg, a glittering evening tucked full of tributes to the Russian arts, opening to reveal carefully crafted surprises, small jokes and even painful memories.

Beyond the celebration of a rich cultural tradition, this was an evening to salute the athletes who marched so joyfully through the arena — and for Russia to proclaim it had delivered all it promised when it was elected seven years ago to host the Winter Games.

“We did it,” Dmitry Chernyshenko, president of the Sochi 2014 Organizing Committee, told a cheering crowd. “We conquered the Olympic summit. And these Games will be with us forever.”

This, he said, was a great moment in Russian history.

“This is the new face of Russia,” he said, “our Russia.”

Much of the evening was spent paying homage to the old Russia, a country known to anyone who has ever watched “The Nutcracker,” read “Anna Karenina,” seen “The Cherry Orchard,” laughed at a great clown — or marveled at a jeweled Fabergé egg in a museum.

“We feel your country,” Daniele Finzi Pasca, the artistic director of the Closing Ceremonies and an Italian Swiss, had said earlier in the day. “It is under our skin.”

The great writers were acknowledged in huge banners with portraits of Pushkin — of course — Tolstoy, Chekhov, Dostoyevsky and Solzhenitsyn. The surprises were Joseph Brodsky — expelled by the Soviet Union in 1972 — and the poet Anna Akhmatova — brutally repressed by Stalin, her husband shot by Soviet secret police and her son sent off to the gulag. Most Russians never heard of her until perestroika in the late 1980s.

The scene was set in a vast library, and suddenly gales of wind blew through, sending manuscript pages into the whirlwind of Soviet persecution. A voice recited some of their words, including a passage from Mikhail Bulgakov, “manuscripts don’t burn.” The pages could be burned, but the words would survive.

Konstantin Ernst, chief creative director for the opening and closing ceremonies, had said Sunday’s closing had to strike a different tone from the grand sweep through Russian history of the opening.

“We’re going down the art house avenue,” he said. But art house with a sense of humor.

Remember the Opening Ceremonies, when one of the five snowflake-like figures that opened into Olympic rings failed to unfold? Sunday night, dancers, looking as if they were flowing strands of tinsel in their reflective costumes, first darted and streamed as if they were fish in the nearby Black Sea. Finally, they formed into five flower-like clusters. Four opened into Olympic rings. One hovered, unattached, as if unable to open. Then it did, and the five rings were perfect. The audience laughed and applauded.

Russian tweets exploded: “The Ring!”

The program picked up on the opening theme, a little girl named Lyubov, flying above the Russian landscape. Sunday night she glided in on a rowboat suspended high in the sky.

The music had its own unexpected twist.

“We wanted to start the ceremony with a piece of music that sounds very much like Hollywood music; music written for a Western,” Finzi Pasca said. “All this will amount to a soundtrack that resembles an Oscar-winning blockbuster Hollywood movie.”

So, in this land where anti-Americanism has been encouraged as something of a national hobby, the little girl was ushered in by the theme music for “It’s a Wonderful Life,” the much-loved American Christmastime movie starring James Stewart.

The music was written by Dmitri Tiomkin, who was born in Ukraine in 1894 and ended up in Hollywood, where he became something of a legend. He wrote music for “High Noon,” “The Old Man and the Sea,” “Giant,” “The Alamo” and “Friendly Persuasion.

So, a large slice of Americana, right here in a celebration of Russia.

A great pianist played Rachmaninoff. A Chagall-like village floated by, upside down, with another village below: a cast of 130, including 40 stilt-walkers wearing animal heads, brides hovering from 30-foot-wide clouds, a violinist playing merrily.

Russian athletes had made their country proud, stacking up the most medals: 33, 13 of them gold. (The United States had 28 medals, nine of them gold.)

Thomas Bach, president of the International Olympic Committee, declared the Games closed. “Tonight we can say Russia delivered all that it promised.”

He congratulated Vladimir Putin. The Russian president’s personal commitment, he said, had meant extraordinary success.

In the end, security was tight. No one slept on the street despite criticism over unfinished hotels. The snow held up, though sometimes just barely.

Still, not everyone was satisfied. Gennady Gudkov, an opposition politician critical of Russia’s human rights record, watched the Closing Ceremonies with some regret.

“If only our rich, talented and athletic country could have good authorities and our people could have the feeling of self-dignity,” he wrote in a tweet. Ernst said the ceremony had ended on a note of optimism and wistfulness. “For 17 days, Sochi has been the center of the universe,” he said, “and now it is time to say goodbye.”