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 Maracana soccer stadium, Brazil will declare open the 31st Summer Olympic Games and the first ever in South America. They will run until Aug. 21.
Organizers 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.
Security challenges in the sprawling beachside city are at the forefront of many people's mind, not only because of Rio's decades-old reputation for violent street crime, but also after a spate of deadly attacks at big and small celebrations from Europe to the United States.
With many of the Games' 11,000 athletes and dozens of heads of state in attendance, the first major test of preparedness comes at Maracana, where the biggest security operation of the Games will be deployed.
Some 50,000 spectators are expected while more than 3 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 Botanico neighbourhood, 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 organizers 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 favourite 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 "marvellous city" - from the Christ the Redeemer statue atop the lush green mountains to the striking Pao de Acucar or Sugar Loaf rock formation on Guanabara Bay.