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.
Winter Olympics: Day 16 And Closing Ceremony
1/18Skiers compete during the men's cross-country 50-kilometer marathon. (Reuters/Carlos Barria)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
2/18Russia'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)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
3/18Russia's Alexander Zubkov and and his teammates celebrate finishing first during the four-man bobsleigh event. (Reuters/Murad Seze)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
4/18Canada'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)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
5/18Canada'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)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
6/18Norwegian medalists in the women's cross-country skiing 30-kilometer race during the medal ceremony. (EPA/Barbara Walton)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
7/18A 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)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
8/18Dancers create the incomplete Olympic Rings during the closing ceremony. (EPA/Barbara Walton)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
9/18Performers take part in the show during the closing ceremony. (Reuters/Issei Kato)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
10/18Military musicians take part in the closing ceremony. (Reuters/Lucy Nicholson)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
11/18Russian President Vladimir Putin and IOC President Thomas Bach watch the ceremony. (EPA/Tatyana Zenkovich)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
12/18The Russian flag is carried into the stadium. (EPA/Barbara Walton)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
13/18Athletes from different countries take part in the closing ceremony. (Reuters/Grigory Dukor)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
14/18Flagbearers arrive holding their national flags. (Reuters/Marko Djurica)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
15/18Russian pianist Denis Matsuev (center) performs during the closing ceremony. (Reuters/Pawel Kopczynski)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
17/18From 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 main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
18/18The polar bear Olympic mascot prepares to extinguish the Olympic flame. (AFP/Damien Meyer)
The main events of the final day of the Sochi 2014 Winter Olympics in photos. On Day 16, February 23, Russia took two gold medals and Canada won the men's ice hockey gold medal match against Sweden. As Sochi marked the end of the games with an elaborate closing ceremony, the Olympic flag was handed over to the mayor of Pyeongchang, South Korea, host of the next Winter Olympics. (18 PHOTOS)
Previous slide
Next slide
PHOTOS: Winter Olympics -- Day 16 And Closing Ceremony