RIO DE JANEIRO (AFP) - Brazil may have so far escaped the radar of radical Islamist groups, but the Rio Olympics is taking no chances on terrorism when the Games start in six months.
"We are on permanent alert. We are ready for the worst-case scenario," said Andrei Rodrigues, secretary of government security for major events.
Rodrigues' department already has solid experience from keeping order at events including the 2014 World Cup and Pope Francis' visit in 2013.
But attacks by Islamist gunmen in Paris and elsewhere in 2015 have raised the stakes at big, international events.
Some 85,000 security personnel - 47,000 police and 38,000 soldiers - will guard 10,500 athletes and the huge number of journalists, tourists and others flocking from around the world to Rio for the August 5-21 Games. The deployment will be double that in London in 2012.
And even without terrorism, Rio can be dangerous.
Large parts of the city are off-limits to tourists, street crime is common, and authorities are on guard against possibly violent political demonstrations.
Brazil has stayed outside the war waged by Islamic State in Iraq and Syria (ISIS) and other militant groups.
But after a wave of attacks in Paris, Egypt, Mali and Tunisia by Islamists armed with little more than assault rifles, the worry is that Rio might be vulnerable to the same kind of dramatic, low-tech assault.
"As Brazil is not taking part in the various conflicts in the Middle East and overall South America is a zone far apart from current geopolitical troubles, you might think that it's not a target," said Pascal Boniface, director of the Institut de Relations Internationales et Strategiques in Paris.
"However, what terrorists look for is to make an impact on opinion, and apart from the World Cup there is no world event more visible than the Olympics," he said. "The risk of terrorism follows where the cameras go."
The Olympics still bears the scars of the 1972 Munich Games where Palestinians took hostage the Israeli team and killed 11 members. And while Brazilians might feel safe now, the Games will feature citizens of the United States, European countries, Israel and others whose countries are in direct conflict with jihadist groups.
On Nov 16, three days after the latest Paris attacks, Maxime Hauchard, a leading French recruit of the ISIS group, tweeted: "Brazil, you're our next target." As during the World Cup, Brazil will run coordination centers in Rio and the capital Brasilia for all its police, army, customs and intelligence services.
These nerve centers will be able to send agents on the ground in case of alarm and will also be in close contact with security centers in Rio's four Olympic hubs: Barra da Tijuca, where the athletes' village will be; the Maracana stadium, where opening and closing ceremonies take place; Deodoro and Copacabana.
In the aftermath of the Paris attacks of Jan 2015 on the offices of the satirical newspaper Charlie Hebdo, it was also decided to set up a dedicated anti-terrorism center, Rodrigues said.
Intelligence services of numerous countries have been sharing sensitive information there since July, he said.
"All states want this to go well," Boniface said. "We can expect cooperation to be very strong. National rivalries will be set aside." Brazil is also a member of the API-PNR system, which monitors all air travel, so police will be kept informed in real time of who is flying to the country.
Boosting that international cooperation, about 100 Brazilian police officers have travelled to study security at events like the Tour de France, the Boston and Berlin marathons, and also during the UN General Assembly in New York.
Elite Brazilian troops also regularly train with foreign colleagues on hostage situations.
"At this stage, the risk of a multiple, coordinated attack is reckoned fairly low," said a French diplomatic source.
That kind of assault needs logistics and a sufficiently large recruitment pool - something that exists in France, but probably not Brazil.
But authorities say they still fear a so-called lone wolf attack, such as the one by two self-organized militant sympathisers at the 2013 Boston marathon that killed three and injured 264.
And even if Brazil is off the terrorism map, its vast frontiers make it impossible to seal off, as the constant arrival of drugs and illegal weapons make clear. Last year, Rio drug traffickers even managed to steal a truck carrying a ton of dynamite.