Host country Brazil and the world said farewell Sunday to the first Olympic Games held in South America, a 16-day spectacle that combined many highlight reel moments with ugly and even bizarre episodes that sometimes overshadowed the competition.
Thousands of fans withstood strong winds and sporadic rain to watch the closing ceremony in iconic Maracana Stadium. The finale was both one last chance to party as well as a transition to the 2020 Summer Olympics to be held in Japan.
The final day of the Olympics featured 12 gold medal events, including men's basketball.
US men's basketball team clinches gold
The U.S. team easily coasted to gold in that matchup against Serbia, winning 96-66. It is the U.S. team's third consecutive gold medal.
Kevin Durant of the NBA's Golden State Warriors scored 30 points while DeMarcus Cousins of the Sacramento Kings added 13 points and 15 rebounds. With this game, Carmelo Anthony of the New York Knicks becomes the first man to win three Olympic basketball gold medals.
Spain beat Australia, 89-88, in the bronze medal game.
Rio Olympics Basketball Men: United States' Kevin Durant celebrates winning the men's basketball gold medal at the 2016 Summer Olympics in Rio de Janeiro, Brazil, Sunday, Aug. 21, 2016.
In other action, Kenya's Eliud Kipchoge won the gold medal in the men's marathon. Kipchoge completed the race in 2 hours, 8 minutes, 44 seconds, ahead of Ethiopia's Feyisa Lilesa and Galen Rupp of the U.S.
Claressa Shields became the first American boxer of either gender to win gold medals in two consecutive Olympic competitions. In a unanimous decision, Shields defeated Nouchka Fontijin of the Netherlands to win the middleweight title. Shields has not lost a fight in more than four years.
Uzbekistan's Shakhobidin Zoirov captured the flyweight gold medal with a unanimous decision win over Misa Aloian of Russia.
Rio Olympics Boxing: Medalists from left; Russia's Misha Aloian, silver; Uzbekistan's Shakhobidin Zoirov, gold; Venezuela's Yoel Segundo Finol, bronze; and China's Hu Jianguan, bronze; display their medals for the men's flyweight 52-kg boxing at the 2016 Summer Olympics in Rio de Janeiro, Brazil, Sunday, Aug. 21, 2016.
Also on Sunday, Russia captured the gold medal in the all around rhythmic gymnastics, beating Spain and third-placed Bulgaria.
Russia's Soslan Ramonov won the gold medal at 65 kilograms in the men's freestyle wrestling tournament by defeating Toghrul Asgarov of Azerbaijan.
Nino Schurter of Switzerland outlasted Jaroslav Kulhavy of the Czech Republic Sunday to win the mountain bike race.
United States' Ryan Lochte checks his time in a men's 4x200-meter freestyle heat during the swimming competitions at the 2016 Summer Olympics, in Rio de Janeiro, Brazil, August 9, 2016.
Lochte, teammates could face disciplinary action
U.S. Olympic Committee CEO Scott Blackmun on Sunday said 12-time swimming medalist Ryan Lochte and his three teammates who falsely claimed they were robbed in Rio will face disciplinary action. Blackmun did not offer specifics but expressed frustration at their behavior. "They let down our athletes," he said. "They let down Americans."
Lochte admitted Saturday he "over-exaggerated" assertions that he and three teammates were the victims of an armed robbery at a Rio De Janeiro gas station. He insisted, however, that he did not lie, but still issued an apology. "I'm sorry," he said. "Brazil doesn't deserve that."
Lochte maintained he was a victim of blackmail because he was forced by armed guards to give them money. Swimmer Gunnar Benz said the guards accosted them after they had urinated behind some bushes and Lochte had ripped an advertising poster from a wall.
WATCH: In Photos Rio Olympics Closing Ceremony
Tokyo to host next Summer Games
The Olympic games in 2020 will be held in Tokyo, Japan, where preparations have been under way since it was awarded the competition in 2013.
Tokyo beat out Istanbul, Turkey and Madrid, Spain for the right to host the 2020 games, which will feature five sports that were not held in Rio. Those sports are baseball/softball, climbing, karate, skateboarding and surfing.