Jamaica's Usain Bolt greets fans as he celebrates winning gold in the men's 4 x 100-meter relay final, during the athletics competitions of the 2016 Summer Olympics at the Olympic stadium in Rio de Janeiro,... (Associated Press) 
 
 Jamaica's Usain Bolt greets fans as he celebrates winning gold in the men's 4 x 100-meter relay final, during the athletics competitions of the 2016 Summer Olympics at the Olympic stadium in Rio de Janeiro, Brazil, Friday, Aug. 19, 2016. (AP Photo/David Goldman) (Associated Press) 
 
 RIO DE JANEIRO (AP) — Michael Phelps won more medals than anyone else, again. And then he said farewell, also again. 
 
 Usain Bolt kissed the finish line goodbye after enhancing his Olympic legacy. Simone Biles and Katie Ledecky delivered under the burden of enormous expectations. Two strangers went from rivals to forever-linked by a display of kindness, an entire island seemed to celebrate a tennis match, and a gold medalist scampered home to avoid legal issues after a robbery story unraveled. 
 
 And then the home team won soccer gold. 
 
 The Rio de Janeiro Olympics were not perfect. 
 
 But there were moments — some great, some dreadful and some downright ugly — that will not, and should not, be forgotten. 
 
 Here's a look: 
 
 ___ 
 
 MEDAL LEADERS 
 
 The U.S. dominated the medal count, a rare romp in a non-boycotted games. There's still more medals to win Sunday, but the margin of overall victory could be the most in a fully attended games in 68 years. Phelps won six medals, five of them gold, to increase his career haul to 23 Olympic titles and 28 medals overall. Ledecky and Biles each won five medals; Biles will carry the U.S. flag into the closing ceremony. And U.S. shooter Kim Rhode has now won a medal in six consecutive Olympics — and she might not be done. 
 
 ___ 
 
 BEST FINISH 
 
 Bolt kissing the finish line after his ninth and final Olympic gold — in nine final races — was a perfect ending. He ran the anchor leg of the 4x100-meter relay for Jamaica, won emphatically to become the third athlete ever with nine golds in track and field, and insists that this will be the end of his Olympic career. 
 
 "Nothing left to prove," Bolt said. 
 
 He's right. 
 
 "I am the greatest," he added. 
 
 Right again. 
 
 ___ 
 
 BEST ACT OF SPORTSMANSHIP 
 
 An easy pick. 
 
 In the women's 5,000-meter heat, Abbey D'Agostino of the U.S. and New Zealand's Nikki Hamblin — strangers before that day — were involved in a tumble. D'Agostino helped Hamblin up, encouraging her to finish the race. D'Agostino tore a knee ligament in the fall and obviously couldn't finish. Hamblin wound up finishing last of 17 in the 5,000 final, so neither left with a medal. 
 
 Instead, they got so much more. 
 
 "That girl is the Olympic spirit right there," Hamblin said of D'Agostino. "I've never met her before. Like I never met this girl before. And isn't that just so amazing?" 
 
 Yes, it is. 
 
 ___ 
 
 BIGGEST EMBARRASSMENT 
 
 Another easy pick, even in a games where an Egyptian was sent home after failing to shake an Israeli judo opponent's hand. 
 
 Ryan Lochte is a 12-time Olympic medalist, and the odds that he'll have a chance to ever swim for a 13th are as murky as some of the pools were in these Rio Games. Lochte's story that a robber put a gun to his head quickly unraveled, his three teammates who were companions that night all were left to answer legal questions after he scurried home, and more repercussions from the U.S. Olympic Committee are likely coming. 
 
 "It's traumatic to be out late with your friends in a foreign country — with a language barrier," read part of the apology that Lochte released on social media Friday. 
 
 Maybe so, but it bears noting that language barrier or no language barrier, the incident occurred after Lochte left a night out at ... Club France. So it would seem like not all foreign atmospheres struck him as traumatic before now. 
 
 ___ 
 
 BREAKOUT STAR 
 
 We asked. You voted. 
 
 Narrowing the list of potential candidates to four — Simone Manuel (four swimming medals), Joseph Schooling (beat Phelps for a gold in the pool), Monica Puig (whose tennis gold was Puerto Rico's first Olympic title in any sport) and Ibtihaj Muhammad (the barrier-breaking fencing medalist) — AP asked its Twitter followers to have a say in deciding this one. 
 
 The response was overwhelming, and one-sided: Puig is the breakout star of these games. 
 
 Reduced to tears many times after draping the Puerto Rican flag across her body after the gold-medal match, Puig beat two of the world's best five players to win the title. 
 
 "To do this ... is everything," Puig said. 
 
 The Olympic ideal, personified. 
 
 ___ 
 
 BEST COACH 
 
 Due respect to Mike Krzyzewski, Geno Auriemma, Martha Karolyi and the Japanese wrestling coach who found himself getting body-slammed twice in celebration by women's gold medalist Risako Kawai, this one goes to Ans Botha — the 74-year-old great-grandmother who guided South Africa's Wayde Van Niekerk to Olympic gold and a world record in the men's 400 sprint. 
 
 Her style is simple. When the smile goes away and the voice gets stern, it's time to get serious. Sort of like most great-grandmothers. 
 
 "She's an amazing woman," Van Niekerk said. "Her work ... I think it speaks for itself." 
 
 ___ 
 
 BEST COUPLE 
 
 Decathlon champion Ashton Eaton of the U.S. and his wife, heptathlon bronze medalist Brianne Thiesen-Eaton of Canada, would be a very easy selection here. 
 
 But what Kate Richardson-Walsh and Helen Richardson-Walsh did was even more rare. 
 
 They're married, and played for the same gold-medal winning British women's field hockey team. In a games that had more openly gay athletes than ever before, theirs was a moment that surely resonated with many around the world who don't know the first thing about field hockey. 
 
 "To win an Olympic medal is special. To win an Olympic medal with your wife standing next to you ... we will cherish this for the rest of our lives," Kate Richardson-Walsh said. 
 
 ___ 
 
 BEST BACK-AND-FORTH 
 
 When the U.S. women's soccer team was ousted by Sweden (and former U.S. coach Pia Sundhage), American goalkeeper Hope Solo raised eyebrows with her assessment of the match. 
 
 But her former coach had the perfect rebuttal. 
 
 "We lost to a bunch of cowards," Solo said. 
 
 "It's OK to be cowards if you win," Sundhage countered. 
 
 ___ 
 
 BIGGEST OFF-FIELD STAR 
 
 A tough category, especially after Leslie Jones of "Saturday Night Live" parlayed hilarious Twitter commentary into an invite to Rio. Matthew McConaughey hung out with everyone from the U.S. women's rugby team to Phelps, and Gisele Bundchen's catwalk in the opening ceremony was one not to forget. 
 
 But the pick here is Zac Efron, who flew to Rio just to surprise the U.S. women's gymnastics team — particularly Biles, who doesn't hide her enormous crush on the actor. 
 
 He also saw Bolt and the U.S. men's basketball team, but let's face it, no one is going to ignore invites to hang with Biles and the U.S. gymnasts right now. 
 
 ___ 
 
 BEST SPIN 
 
 No one might have been better at their job during the Olympics than Mario Andrada, the spokesman for the Rio Games organizing committee. 
 
 When something went wrong it was his job to explain it — and do so with the world watching and listening. He and International Olympic Committee spokesman Mark Adams held daily hourlong briefings with reporters, and Andrada offered up some quote gems. So we'll go ahead and award his head-scratching statements their own set of medals. 
 
 The bronze: "Numbers mislead," he said, as part of an answer about ticket sales and poor crowds. 
 
 The silver: "Let's give these kids a break," he said of Lochte and his U.S. swimming teammates, after their incident. 
 
 The gold: "Chemistry is not an exact science," he said, talking about why the water at a diving pool went from blue to green. 
 
 ___ 
 
 BEST BRAZILIAN MOMENT ... 
 
 Stand up and cheer, City of God. 
 
 One of your own is now an Olympic champion. 
 
 Slums, or favelas, are everywhere in Rio — none more infamous than the City of God, which rose to fame through the 2002 movie of the same name that depicted life in the slum. Rafaela Silva grew up there, and she won gold in judo at these Rio Games. 
 
 Now that's a made-for-Hollywood story. 
 
 ___ 
 
 ... THAT IS, UNTIL THIS HAPPENED 
 
 How's this for a storybook ending for Brazil? 
 
 Soccer gold — and in most dramatic style, too. 
 
 Brazil vs. Germany, men's soccer, gold-medal matchup. Neymar gives the hosts a 1-0 lead, but the Germans tie it and ultimately it goes to penalty kicks to decide the Olympic champion. 
 
 Germany makes its first four. 
 
 So does Brazil. 
 
 Then Germany is stopped on its fifth, and the stage is set for Neymar — who else? — to set off a national celebration. His shot sails into the back of the net, Brazil wins and the roar could be heard all over Rio as Neymar collapsed on the field in a quivering mass of joyous tears. 
 
 Forget all the problems these games had. Forget how many Brazilians opposed them in the first place. 
 
 They got their perfect finish to an imperfect Olympics. ||||| (CNN) They're the king and queen of Olympic track cycling -- and nobody at Rio 2016 had any way of dethroning them. 
 
 Jason Kenny and Laura Trott made it 10 Olympic gold medals between them Tuesday after a dramatic night of track cycling at the velodrome. 
 
 The British riders, who will get married next month, stole the show in contrasting style. 
 
 Trott took her golden tally to four as she defended her women's omnium title -- making her Britain's most successful female Olympian. 
 
 And Kenny then made history of his own -- equaling his former teammate Chris Hoy's all-time British record of six gold medals after winning a nerve-shredding keirin race, in which he was almost disqualified. 
 
 Fellow cyclist Bradley Wiggins had become Britain's most decorated Olympian when he collected his eighth medal after helping the men's pursuit team to victory last Friday -- five of that tally being gold. 
 
 At just 24 years of age, few would bet against Trott surpassing the trio. 
 
 She helped the British women's team win the pursuit at the weekend, adding to her two golds in London four years ago. 
 
 Trott has now won four Olympic gold medals. 
 
 "I am so proud at what I achieved," she told reporters. 
 
 "I cannot thank the people in the background enough. I always thought how special London (2012 Olympic Games) was. 
 
 Photos: Rio Olympics: Day 11 Photos: Rio Olympics: Day 11 Canada's Derek Drouin clears the bar on his way to winning gold in the high jump on Tuesday, August 16. Hide Caption 1 of 30 Photos: Rio Olympics: Day 11 Brazil's Robson Conceicao, left, boxes France's Sofiane Oumiha in the lightweight final. Conceicao won the bout to earn the host country its first-ever gold medal in boxing. Hide Caption 2 of 30 Photos: Rio Olympics: Day 11 Spain's Carolina Marin celebrates a victory in the badminton quarterfinals. Hide Caption 3 of 30 Photos: Rio Olympics: Day 11 Dutch field hockey player Bob de Voogd, right, is challenged by Belgium's Emmanuel Stockbroekx during a semifinal match. Belgium won 3-1 to advance to the final against Argentina. Hide Caption 4 of 30 Photos: Rio Olympics: Day 11 U.S. gymnast Sam Mikulak competes in the final of the horizontal bar. Hide Caption 5 of 30 Photos: Rio Olympics: Day 11 French synchronized swimmers Laura Auge and Margaux Chretien compete in the duets final. Hide Caption 6 of 30 Photos: Rio Olympics: Day 11 Jamaican sprinter Usain Bolt wins a 200-meter heat. He won gold in the 100 meters earlier this week. Hide Caption 7 of 30 Photos: Rio Olympics: Day 11 Great Britain's Laura Trott and her fiance, Jason Kenny, pose with their gold medals in track cycling. Kenny won the keirin and Trott won the omnium. Hide Caption 8 of 30 Photos: Rio Olympics: Day 11 Armenian wrestler Artur Aleksanyan, in red, competes against Cuba's Yasmany Daniel Lugo Cabrera in a Greco-Roman final. Aleksanyan came out on top. Hide Caption 9 of 30 Photos: Rio Olympics: Day 11 A general view of the beach volleyball venue. Hide Caption 10 of 30 Photos: Rio Olympics: Day 11 U.S. gymnast Simone Biles competes in the floor exercise. She won the event, finishing this year's Games with her fourth gold and fifth medal overall. Biles is the first woman to win four gymnastics golds in a single Olympics since Romania's Ecaterina Szabo in 1984. Hide Caption 11 of 30 Photos: Rio Olympics: Day 11 U.S. swimmer Jordan Wilimovsky competes in the 10-kilometer open water event. Hide Caption 12 of 30 Photos: Rio Olympics: Day 11 Russian boxer Vladimir Nikitin celebrates after his bantamweight victory over Ireland's Michael Conlan. Hide Caption 13 of 30 Photos: Rio Olympics: Day 11 Bruna comforts her Brazilian teammate Marta after they lost to Sweden in the soccer semifinals. The match was decided on penalty kicks after a goalless draw. Hide Caption 14 of 30 Photos: Rio Olympics: Day 11 U.S. gymnast Danell Leyva competes on the horizontal bar, where he won silver. He also got silver on the parallel bars. Hide Caption 15 of 30 Photos: Rio Olympics: Day 11 Germany's Laura Ludwig reacts during a semifinal win in beach volleyball. Hide Caption 16 of 30 Photos: Rio Olympics: Day 11 Italy's Costanza Ferro and Linda Cerruti perform their technical routine during synchronized swimming. Hide Caption 17 of 30 Photos: Rio Olympics: Day 11 Volleyball teams from Japan and the United States wait for the start of their quarterfinal match. Hide Caption 18 of 30 Photos: Rio Olympics: Day 11 Brazilian diver Cesar Castro competes in the 3-meter springboard event. Hide Caption 19 of 30 Photos: Rio Olympics: Day 11 Cuba's Yaime Perez competes in the discus throw final. Hide Caption 20 of 30 Photos: Rio Olympics: Day 11 Italian golfer Giulia Molinaro tees off on the fifth hole during a practice round. Hide Caption 21 of 30 Photos: Rio Olympics: Day 11 Spain's Francisco Fernandez competes in a water polo quarterfinal match against Serbia. Hide Caption 22 of 30 Photos: Rio Olympics: Day 11 American Christian Taylor won gold in the triple jump. He also won the event in the 2012 London Games. Hide Caption 23 of 30 Photos: Rio Olympics: Day 11 Australian equestrian Scott Keach falls off his horse, Fedor, during the individual jumping competition. Hide Caption 24 of 30 Photos: Rio Olympics: Day 11 New Zealand's Nikki Hamblin, left, helps Abbey D'Agostino of the United States after they collided during the 5,000-meter semifinal. Both runners managed to finish the race. Hide Caption 25 of 30 Photos: Rio Olympics: Day 11 Chinese cyclist Tianshi Zhong competes in a sprint quarterfinal. Hide Caption 26 of 30 Photos: Rio Olympics: Day 11 New Zealand's Eliza McCartney takes part in pole vault qualifications. Hide Caption 27 of 30 Photos: Rio Olympics: Day 11 Swimmers prepare for the 10-kilometer open water event. Ferry Weertman of the Netherlands earned the gold. Hide Caption 28 of 30 Photos: Rio Olympics: Day 11 Track cyclists prepare to compete in the first round of the keirin. Hide Caption 29 of 30 Photos: Rio Olympics: Day 11 Canoeist Josef Dostal of the Czech Republic, left, celebrates with Spain's Marcus Walz after the K-1 1,000-meter final. Walz and Dostal took gold and silver while Russia's Roman Anoshkin earned the bronze. Hide Caption 30 of 30 
 
 "I went there without any expectations, so to win two golds was just incredible, and then I thought, 'How on earth am I going to top that?' We believed in ourselves, and in our team. It just started to snowball. 
 
 "I worked day-in, day-out with those girls, and the team pursuit is what I really targeted. To come back and win the omnium, it's just incredible. 
 
 "You realize how hard it is to do it all again. It was so hard to build myself up and come back again. We did a lot of work in the gym, and completely changed our program." 
 
 On Tuesday, Trott became the first woman to collect a fourth Olympic gold medal in track cycling, surpassing Felicia Ballanger of France on three. She led the two-day, six-event competition from start to finish, leaving the rest of the field to fight for silver and bronze. 
 
 Trott won by a commanding 24 points, while the gap between second-placed American Sarah Hammer and Belgium's Jolien D'Hoore in third was just seven points. 
 
 Kenny celebrates after winning the men's keirin final. 
 
 Kenny's victory was less clear-cut. The keirin race had to be stopped twice after riders were adjudged to have passed the derny pace bike before it had left the track. 
 
 The first time it was Kenny and Malaysia's Azizulhasni Awang, who had an agonizingly long wait before the judges ruled that all the cyclists could compete in the restart. 
 
 Then Germany's world champion Joachim Eilers over-rode the mark, and again the race was stopped. 
 
 When it did finally get going, Kenny timed his move to perfection, overtaking Dutchman Matthijs Buchli and Awang, who won silver and bronze respectively. 
 
 Arghhhh!!!!!! I love him to bits @JasonKenny107 !! Our kids have to get some of these genes right?! — Laura Trott (@LauraTrott31) August 16, 2016 
 
 Kenny added to his earlier men's sprint and team pursuit golds in Rio, having won twice at London 2012 and once at Beijing four years before that -- also getting silver in China. 
 
 "It just felt like a dream. I guess I'm tired. I was just floating through it," the 28-year-old said. "It's mental to be level with Chris. I was in Beijing when he won his three so to come here and do the same is pretty amazing." 
 
 Britain won two more medals in Tuesday's women's sprint event, with Becky James beaten by Germany's Kristina Vogel in the final and Katy Marchant winning the bronze race against Elis Ligtlee of the Netherlands.
– The 2016 Olympics came to an end when Rio officially handed things over to 2020 host Tokyo Sunday night in a jubilant closing ceremony that featured, among other things, Japan's Prime Minister Shinzo Abe rising from a pipe dressed as Super Mario. A look back at some of the best moments from Rio: Usain Bolt's triple-triple. "I am the greatest," the Jamaican runner declared after winning gold in a third race at a third consecutive Olympics. Few would quibble with that statement. Michael Phelps' swim into history. He took another six golds in Rio, giving the "once in 10 generations" swimmer a staggering 23 golds over his career—14 more than any other athlete has ever scored. Team Refugee. For the first time, the Olympics featured a team made up of refugees from the world's conflict zones. "You have inspired us with your talent and human spirit," IOC President Thomas Bach said in his closing address. Simone Biles' amazing performance. She won a record-tying fourth gold in one of the greatest Olympics a gymnast ever had, displaying what Penelope Blackmore at the Guardian calls "jaw-dropping power, laser precision, and pure dynamism." Almaz Ayana's record-breaking run. Some 27 world records were broken in Rio. The first to fall inside the Olympic Stadium was the women's 10,000-meter record, which the Ethiopian runner beat by more than 14 seconds. Liina, Lily, and Leila Luik. The Estonian women set a different kind of Olympic record by becoming the first triplets ever to compete in the marathon. Helping hands. America's Abbey D'Agostino and New Zealand's Nikki Hamblin showed true Olympic spirit—and won Fair Play Awards—by helping each other after a tumble in the women's 5,000 meters. The Brits who are being called the best couple. Kate and Helen Richardson-Walsh not only became the first same-sex married couple to compete in the Olympics, they won the field hockey gold. Changing of the guard. Phelps had an Olympic swimming career that might never be matched unless dolphins start competing—though he was beaten in the 100-meter butterfly by 21-year-old Singaporean Joseph Schooling, who grew up idolizing Phelps. Soccer gold. Brazilians breathe soccer, and they got what the AP calls a "perfect finish to an imperfect Olympics" when their team beat Germany to take the gold.