The Rio Olympics ended Sunday night with a Closing Ceremony inspired by the South American nation’s famous Carnival. Simone Biles, who won four gold medals and a bronze in gymnastics, carried the U.S. flag in the ceremony. She led a U.S. team that collected 121 medals — the country’s biggest haul in a non-boycotted Olympics since 1904. The rainy, three-hour ceremony marked the official handover of the Olympic flag to Tokyo, which hosts the next Summer Games in 2020. Despite complaints about preparations and the high cost of hosting the Games, the Rio Olympics were widely seen as a success and a welcome distraction from Brazil’s economic and political troubles.