The Rio Olympics will be remembered for lots of things its organizers would rather forget. There were muggings and assaults, with the victims including athletes and government officials. A ticket-scalping scandal landed an Irish Olympic official in jail. The diving and water polo pools turned green, and the U.S. Olympic Committee turned red when swimmer Ryan Lochte made up a story about being robbed. These Olympics had more problems than most, but the athletes — as usual — saved the day. Inside the venues, all of Rio's troubles could be put aside for a couple of hours at a time. Watching Simone Biles flip and tumble to four gold medals, or seeing Usain Bolt strike his now-familiar "To Di World'' pose after winning another sprint title, provided the same exhilaration and inspiration the modern Olympics have been supplying for 120 years. In Rio, the Games faced some of their most daunting obstacles in years. Like the athletes themselves, though, they kept right on running.

MAKING A MARK

Long before the Games started, U.S. gymnast Simone Biles seemed destined to become one of Rio's biggest stars. The tiny but mighty Texan delivered, and she encapsulated the accomplishments of American women of color in Rio. Biles' sublime floor-exercise routine and powerful vaults gave her gold medals in the team and all-around competition, as well as both event finals. In other sports, Ibtihaj Muhammad became the first U.S. woman to wear a hijab in Olympic competition; Simone Manuel was the first black woman to win an individual gold medal in Olympic swimming; and Michelle Carter was the first U.S. woman to win the Olympic shot put. Biles will be remembered as perhaps the greatest gymnast of all time, further proving that women of color — who won 28 medals for the U.S. — are a powerful force in Olympic sport.

GIVING HOPE

The people who live in Rio's slums, called favelas, fight against poverty and despair every day. They found a ray of hope in Rafaela Silva, a judo player who won Brazil's first gold medal of the Games. Silva, who grew up in the infamous "City of God" favela, became an instant hero who transcended Brazil's daunting divide between the wealthy and the indigent. The Olympics are not expected to materially improve the lives of Rio's poorest, but the Games gave Silva the opportunity to show they can rise above their circumstances. "I want to create a dream for them," she said. "Because nobody there has a dream."

A CALLING OUT

Last spring, U.S. runner Alysia Montano said drug scandals had robbed her sport of "the idea of amazing." That anger spread to the swimming pool in Rio, where Mack Horton and Lilly King raised their voices in an environment ripe with tension over doping. Horton, of Australia, called a Chinese rival a "drug cheat." King, an American, said the same of Russia's Yulia Efimova. Some questioned whether that was proper behavior for the Olympics. But many sided with athletes weary of competing against drug-fueled competitors, especially at a Games in which some — but not all — Russian athletes were banned after evidence of widespread state-sponsored doping.

'I'M THE GREATEST'

With nine Olympic medals now, Usain Bolt can afford to nitpick. The Jamaican sprinter didn't run as fast as he would have liked in Rio, but he still came away with an unprecedented feat in his final Summer Games. Bolt bagged his third consecutive Olympic triple-triple, winning the 100 and 200 meters and anchoring Jamaica's victorious 4x100 relay. "I've done all I can do," said Bolt, who turned 30 on Sunday. "I've proven to the world that I'm the greatest in the sport." Since Bolt said he never puts limits on himself, he should probably remove that qualifier and accept his place as one of the greatest, period.

A PROUD NATION

If you're going to win your country's first medal, be sure to make it golden. Fiji's men's rugby sevens team took the championship in the sport's Summer Games debut, then returned home to a hero's welcome. Rugby is Fiji's national sport, and no wonder; the country produces swift, nimble players whose moves rival anything seen in the NFL. The gold was Fiji's first medal in 60 years of competing in the Olympics and led the government to declare a national holiday.

A CLASS ACT

Is this really it for Michael Phelps? The most decorated Olympian in history says the Rio Games were his last Olympics, but he said that after the 2012 London Games, too. At 31, he looked revitalized in winning another five gold medals and a silver, fattening his haul to 23 golds and 28 medals over five Olympics. While Ryan Lochte's antics drew more attention — and possible sanctions — Phelps' maturity and humility only burnished his legacy. He even shared the spotlight with his baby boy, Boomer, the biggest charmer at the pool.

OLYMPIC SPIRIT

Overshadowed by crime, empty seats, green water in the diving pool and other problems, the spirit of the Olympics often struggled to shine through in Rio. Abbey D'Agostino of the U.S. and New Zealand's Nikki Hamblin pushed aside those troubles in a display of Summer Games sportsmanship felt around the world. The two collided in a preliminary heat of the women's 5,000-meter run and fell to the track. D'Agostino helped Hamblin up, and Hamblin returned the favor when the injured D'Agostino fell a second time. "That girl is the Olympic spirit right there," Hamblin said. "Isn't that just so amazing?" Yes, it was, and it resonated in an Olympics that sorely needed it.

SOMEONE SPECIAL

Winning an Olympic medal in one of swimming's longer distances is impressive. Winning three is mind-boggling. Katie Ledecky took home gold in the 200-, 400- and 800-meter freestyle, breaking her own world records in the latter two races. The Baltimore native became only the second woman — and first since 1968 — to sweep those distances at the Olympics, and she earned another gold and a silver in two relays. The unassuming 19-year-old tied a U.S. women's Olympic record with her four golds and showed she can sprint, too, racing in the 4x100 relay.

COMING TOGETHER

It was a novel concept, and a fitting one for a world in turmoil. For the Rio Games, the International Olympic Committee assembled the first-ever Refugee Olympic Team, featuring 10 athletes who fled their countries to escape war, violence and oppression. The team included two Syrian swimmers, two Congolese judo players and six track and field athletes from South Sudan and Ethiopia. They were overwhelmed by media attention and received warm welcomes wherever they competed. "It will give hope to millions of refugees," swimmer Rami Anis said. "It will also give a message to all refugees not to disappear."

AN HONORED COACH

For the U.S. women's water polo team, the Olympics began with horrible news: Blake Krikorian, the brother of coach Adam Krikorian, had died unexpectedly in California. Adam Krikorian returned home for a few days, then came back to Rio and guided his team to a second consecutive gold medal. The U.S. became the first team to win back-to-back Olympic titles and kept alive a 2½-year win streak at every major tournament. After a 12-5 victory over Italy in the gold medal match, the players presented their medals to Krikorian in an emotional gesture of unity.