With a little bit of chaos and a last-minute sprint on preparations, Rio de Janeiro was ready on Friday to revel in a moment seven years in the making: The opening of the Olympic Games.
At an evening ceremony in the famed Maracanã soccer stadium, Brazil will declare open the 31st Summer Olympic Games and the first ever in South America. They will run until August 21.
Organisers are hoping the start of the Games will erase months of bad publicity for Rio - from polluted water to faulty plumbing at the athletes village to worries about the Zika virus - all against the backdrop of a brutal economic downturn.
More From This Section
With many of the Games' 11,000 athletes and dozens of heads of state in attendance, the first major test of preparedness comes at Maracanã, where the biggest security operation of the Games will be deployed.
Read our full coverage on the 2016 Rio Olympics
Some 50,000 spectators are expected, while more than three billion people tune in around the world, as Brazil hosts its second major sporting event in two years, after the 2014 soccer World Cup. "I think it's going to be great," said Braulio Ferreira, 38, who runs a small shop in the Jardim Botânico neighborhood, near the lagoon where rowing and canoeing races will be held. "Like the World Cup, it'll be great to throw a good party and mix with the people from all over."
Like many in Rio, however, Ferreira said citizens had not received benefits like better transport and sanitation promised in the Olympic bid: "It cost a lot of money, but I don't see much of the legacy that was promised."
Brazil's political crisis could crash the party as interim President Michel Temer opens the games. In a bitterly divided country, protesters are encouraging spectators to boo Temer, who took over after the Senate voted to subject leftist President Dilma Rousseff to an impeachment hearing this month.
Brazil won its bid for the Games back in 2009, when the economy was booming and Rio's coffers swelled with royalties from its offshore oil. The economy is now on track for its worst recession in a century and Rousseff is expected to be permanently ousted this month.
In what organisers have called a low-tech ceremony constrained by the dire economy, Brazil will showcase its natural treasures and the cultural riches created by one of the world's most diverse nations.
Samba, Carnival and the famously fun Brazilian spirit are expected to play heavily into the three-hour ceremony, as will a call to save the planet from climate change.
One of the most anticipated moments will be seeing which famous Brazilian will light the Olympic cauldron. The odds-on favorite is soccer legend Pele.
Spokesmen for Pele said he had received the green light from his sponsors and doctor, but the 75-year-old was waiting to see if he felt well enough.
Before the ceremony, the Olympic torch will travel to some of the most well-known landmarks of the "marvelous city" - from the Christ the Redeemer statue atop the lush green mountains to the striking Pão de Açúcar or Sugar Loaf rock formation on Guanabara Bay.