The Olympic flame of the Sochi Winter Games has been extinguished, marking the end of the 17-day games.
Fireworks exploded over the stadium and athletes poured onto the arena floor.
During the closing ceremony, president of the International Olympic Committee Thomas Bach said athletes and visitors to the games had "enjoyed exceptional conditions."
Bach praised Russia for delivering excellent sports venues, outstanding Olympic villages, and "impeccable organization."
Russia, which spent $51 billion on the games, will see the event as a success.
Warnings of terror threats and attacks before the games did not materialize, and Russia's first Winter Games ended with the host nation on top of the medals table, with Norway second and Canada third.
The 2018 Winter Games will be held in South Korea's Pyeongchang.
PHOTOS: Winter Olympics -- Day 16 And Closing Ceremony
Skiers compete during the men's cross-country 50-kilometer marathon. (Reuters/Carlos Barria)
Russia's Alexander Legkov falls on the ground after winning gold in the men's cross-country 50-kilometer marathon. Russia took all three medals in this race. (Reuters/Stefan Wermuth)
Russia's Alexander Zubkov and and his teammates celebrate finishing first during the four-man bobsleigh event. (Reuters/Murad Seze)
Canada's Sidney Crosby (87) scores on a breakaway past Sweden's goalie Henrik Lundqvist during the second period of their men's ice hockey gold medal game. (Reuters/Julio Cortez/Pool)
Canada's goalie Carey Price (left) and Sidney Crosby bump heads after winning their men's ice hockey gold medal match against Sweden. (Reuters/Gary Hershorn)
Norwegian medalists in the women's cross-country skiing 30-kilometer race during the medal ceremony. (EPA/Barbara Walton)
A boy passes a poster of Russian President Vladimir Putin reading "For Motherland, for Russia, for Sovereignty" as he runs to distribute pamphlets to visitors. (REUTERS/Michael Caronna)
Dancers create the incomplete Olympic Rings during the closing ceremony. (EPA/Barbara Walton)
Performers take part in the show during the closing ceremony. (Reuters/Issei Kato)
Military musicians take part in the closing ceremony. (Reuters/Lucy Nicholson)
Russian President Vladimir Putin and IOC President Thomas Bach watch the ceremony. (EPA/Tatyana Zenkovich)
The Russian flag is carried into the stadium. (EPA/Barbara Walton)
Athletes from different countries take part in the closing ceremony. (Reuters/Grigory Dukor)
Flagbearers arrive holding their national flags. (Reuters/Marko Djurica)
Russian pianist Denis Matsuev (center) performs during the closing ceremony. (Reuters/Pawel Kopczynski)
Bolshoi ballet dancers perform. (Reuters/Lucy Nicholson)
From right to left: Pyeongchang Mayor Lee Seok-rae, IOC President Thomas Bach, and Sochi Mayor Anatoliy Nikolayevich Pakhomov during the closing ceremony. South Korea will host the next Winter Olympics. (EPA/Hannibal Hanschke)
The polar bear Olympic mascot prepares to extinguish the Olympic flame. (AFP/Damien Meyer)
Based on reporting by AP and Reuters