RIO DE JANEIRO -- The summer Olympics kick off on Friday in Brazil. ISIS has called for attacks during the games, and Brazil's government is now working closely with the U.S. to bolster its preparations.
Training exercises include simulated shootouts in the Rio subway, with Olympic tourists running for their lives. At Rio's main airport, where athletes and spectators are now arriving, soldiers with automatic weapons are standing guard.
Last month, Brazilian authorities -- with help from the FBI -- arrested 12 people suspected of plotting ISIS-inspired attacks on the games.
"We have this sort of security crisis right before the Olympics," said Robert Muggah, a security expert based in Rio. He says Brazil's massive recession could impact the ability to fight both terrorism and crime.
"More than $550 million was shaved off the public security budget in 2016 at precisely the moment when we need to really amp up security."
Already this summer, shootouts have shut down major city streets, and gunmen killed a patient when they stormed a hospital to free a suspected drug trafficker.
We went on patrol with Rio's police in one of the many neighborhoods where they have worked to regain control from drug traffickers.
One commander said more tourists could lead to more street crime. But 47,000 police officers and 38,000 soldiers are now on duty in Rio -- that's double the security force of the 2012 London Olympics -- and Rio opened this new joint security operation center today.
"There are 55 different law enforcement agencies and intelligence agencies that are going to set up shop in Rio for the Olympics, to work with the federal police and the military police and the intelligence services," said Muggah.
Julianna Doherty brought her family from Vermont to see the Olympics in Rio. She says she is not worried at all about security concerns.
"I think it's dangerous anywhere, and honestly I think Rio is gonna do just fine."
But there are new questions about security here at the main Olympic Park. Last week, Brazil's government fired the firm it had hired to work as security screeners at Olympic venues. They have now been replaced by federal and state police just days before the games begin.