With the Olympics just days away, Brazil's government has fired a firm tasked with screening venues and amped up security in the Olympic village. Security forces have been training to counter terror attacks for months.
Under the pulsing Brazilian sun, crowd control police dressed in heavily armored riot gear set off smoke bombs and practiced control and restraint techniques. Last month, the military took part in the latest training exercise that simulated a bomb explosion on a train near the Deodoro venue zone in the north of the city.
Security forces have been carrying out anti-terrorism drills as early as November - the threat of terrorism has long been a priority in Rio as it prepared to host the 2016 Olympics. Brazilian police have continued to train with foreign forces that have more experience in dealing with such dangers as several other terror attacks took place around the world.
On the eve of the first Games in South America, the security secretary for Rio de Janeiro state, Jose Mariano Beltrame, said the city was "very far from an event of this nature."
The Olympic security operation, the biggest the country has ever seen, kicked off on July 24.
21,000 troops have been deployed as visible reinforcements to support police dealing with the complex question of security in Rio. Throughout the international airport, near metro stations, outside Games venues and even on street corners, camouflaged soldiers stand guard, rifles pointing downward.
According to the secretary for security, there has been a 16 percent fall in thefts and a 27 percent drop in robberies between July 4 and July 27 compared with last year, as the city prepares to receive 500,000 foreign visitors.
Police can't do it alone
But behind the ostensible show of manpower, experts have warned that the use of the armed forces reveals the inadequacy of Rio's police in a city with an ordinarily precarious public security scenario.
The number of troops in the Olympic city was increased by 3,000 at the request of acting Rio state governor Francisco Dornelles, who declared public finances were in a state of "calamity."
He warned that without federal government support, Rio would be unable to meet its commitments to host the Olympic Games, including the imminent collapse in key services like security. Governor Dornelles has since asked for soldiers to remain in Rio after the Olympics.
"Public security is in a process of bankruptcy," said Newton Oliveira, a public security specialist and law professor at Mackenzie Rio University, who was a consultant on security planning for the Pan American Games in 2007.
He said that police resources had been depleted by the poor design of a program to "pacify" or occupy troubled favela communities, opening up spaces for public security threats including terrorism.
"The presence of the armed forces in the security for the Olympics is indispensable," he added. "However, the form of its use, as a kind of 'universal patch' to cover the increasingly glaring failures of the Olympic security planning, can lead to inefficient use."
At the same time, resources have been further stretched by hosting the Games as public dissatisfaction and contempt for the event poses another area for concern.
More protests to come
When the Olympic torch relay arrived in Rio de Janeiro state last Wednesday, it was met with protests and was reportedly extinguished.
The Olympic flame was apparently also put out in the mountain town of Petropolis, Rio, later in the week. It is set to arrive in the city on Thursday ahead of the opening ceremony on August 5.
People have been taking to the streets to protest - most recently on Sunday to call to end corruption
Speaking after a meeting with security chiefs at the Integrated Command and Control Center, Beltrame said police were aware of social movements calling for the flame to be extinguished as it reached Rio. "Our interpretation is that there will be protests," the security secretary said.
"We have various places that have potential problems. What we're doing here since 2007 is seeking to anticipate, to close all these types of gaps because Rio de Janeiro is, without any doubt, difficult, like any city."
He said the concern over public security was constant. "Security is something that we always have to be looking to anticipate. I think you'll never find me at ease about security, independent of the event. The concern always exists."
Athlete robbed at gunpoint
Some volunteers working at Rio 2016 have said they were concerned about their safety in the city while Australian Paralympic sailor Liesl Tesch was robbed at gunpoint in the bayside neighborhood of Flamengo in June.
On Friday, Brazil's government fired a private security firm tasked with screening Olympic venues and replaced them with federal and state police. The company failed to deliver the 3,400 workers needed for the job.
Soldiers stand guard at the international airport, near metro stations, outside Games venues and even on street corners
Meanwhile, security was tightened at the Olympic village after a computer and team shirts from the Australian delegation were stolen during a fire evacuation.
But for others, the army has provided the necessary peace of mind so far.
"You can see the army everywhere so there is nothing to fear," Czech canoe slalom paddler Jiri Prskavec said. "They are even guarding our house inside the Olympic village. I feel very safe."