Security is high in Rio ahead of tonight's opening ceremonies, but that doesn't mean a key to the Olympic Stadium can't go missing.

Responders had to resort to bolt cutters to open a gate at the Engenhao soccer stadium Wednesday after the key couldn't be tracked down.

A video taken by a BBC reporter shows three men working together to open the gate.

Carneiro said that spectators had been lined up at the gate for two hours before being told to move to another gate.

Olympic 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.

Brazil's National Public Security Force -— Forca Nacional — are doing extensive searches of cars entering the media compound with more soldiers on patrol in the park.

OLYMPICS-RIO/SECURITY

A soldier stands guard atop a vehicle in Rio's Copacabana neighbourhood. (Ruben Sprich/Reuters)

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 stadium, home to the opening and closing ceremonies and 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.

Worst recession in a century

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.

With files from CBC News