SOCHI, Russia -- The 2014 Winter Olympics ended peacefully and dramatically on a beautiful early spring night Sunday, a welcomed counterpoint to the tension-filled start three weeks ago.

After 17 days of daredevil snowboarders, graceful figure skaters and stamina-defying cross-country skiers giving it their all, Sochi bid adieu in a closing ceremony that offered a salute to Russian culture. And a strong kick to the finish also gave the hosts the top final medal tally with 33, the U.S. finishing second with 28.

Like stepping into David Lean's "Doctor Zhivago," the production in Fisht Olympic Stadium along the Black Sea showcased Russia's musical and balletic gifts to the world.

For example, producers offered Rachmaninov's "Piano Concert No. 2," featuring 62 pianos, and a collaboration with the famed Bolshoi and Mariinsky ballet companies.

The Russians wanted to present something elegant and subdued. Four hours before the show, two Bolshoi dancers told a foreign visitor they would "try their best to please you tonight."

They didn't need to sweat it after their stunning performance rekindled memories of the Russian Olympic figure skaters who twirled their way into the hearts of their compatriots this month.

"The Games have turned our country, its culture and the people into something that is a lot closer and more appealing and understandable for the rest of the world," said Dmitry Kozak, Russia's deputy prime minister.

$50 billion event

Before the traditional handoff to the next Winter Olympics host city -- Pyeongchang, South Korea -- Sochi offered a final parting present to skeptical guests.

"Tonight, we can say Russia delivered all what it had promised," International Olympic Committee President Thomas Bach told the audience of 40,000. "What took decades in other parts of the world was achieved here in Sochi in just seven years."

Bach thanked Russian President Vladimir Putin "for his personal commitment" to ensure the Games came off as planned. Putin, a visible presence for the last 17 days, attended the ceremonies.

Despite talk of terrorist threats, anti-gay legislation and unfinished hotels, Sochi organizers pulled it together in the most expensive Games in history at an estimated $50 billion. In the end, they rebuilt the Russian Riviera into a modern sea and mountain resort that they hope will become a major tourist destination.

"It was a race to the finish for Sochi," said Scott Blackmun, chief executive of the U.S. Olympic Committee. "I was here more than a year ago and it is amazing what they have done, not just with the volume of construction. They didn't spare anything."

The success led to self-congratulations that could be justified.

"It was a great moment in history, a moment to cherish and pass on to the next generation," Sochi organizing committee President Dmitry Chernyshenko told the crowd. "This is the new face of Russia, our Russia."

Plenty to celebrate

The so-called "Iron Ring" of security around this southern frontier dissuaded the terrorist threats that scared away some Western fans and led to a soulless Olympics lacking in international spirit usually associated with the Games.

But the strong domestic support shined through despite the abject failure of the motherland's hockey team, which lost to Finland in the quarterfinals. Russian fans had plenty to celebrate: 33 medals, including four on the final day with the men sweeping the 50-kilometer cross-country mass start and Siberian bobsledder Alexander Zubkov winning the four-man race.

Russia topped the table for total medals and gold medals (13). The United States was second in total medals with 28, but only fourth in gold medals with nine.

Norway won 26 medals -- 11 gold -- and Canada 25.

The United States had its best Winter Olympics showing outside North America despite 10 fewer medals than in 2010. Although speedskating had a disastrous run with one medal in long- and short-track racing, the action sports kept America near the top. U.S. athletes won eight of 18 medals in the new freeskiing and snowboarding events.

"If you look at things broadly, the medals are getting spread around more," the USOC's Blackmun said. "The fact we are still top of the medal table is indicative that things are alive and well in the U.S."

Four years from now

As the Olympic flame flickered to its final ember outside Fisht stadium, the world turned toward Pyeongchang, the third consecutive host city situated along the coast with nearby mountains. Organizing committee President Kim Jin-Sun said mountain events will be only 30 minutes from the coast, which leads to questions about adequate snow that plagued Vancouver and Sochi.

After Russia spent more than even Summer Olympics cities, the Koreans estimate a more modest $9 billion budget for the 2018 games. Perhaps the biggest question is the participation of North Korea. Kim said Saturday he is hopeful to see neighboring athletes compete.

Pyeongchang will represent the third Winter Olympics in Asia, the first one outside of Japan.

"Thirty years ago, the world saw a developing country," Kim said of the 1988 Summer Games in Seoul. "Just one generation later, the world will see a truly developed Korea."

Russia tried to present a similar image Sunday and all month. For all intents and purposes they succeeded.

An army of athletes, journalists and sports officials will depart the beautiful coast here carrying a positive snapshot back home.

Contact Elliott Almond at 408-920-5865. Follow him on Twitter at twitter.com/elliottalmond.