RIO DE JANEIRO (Reuters) - Brazil is raising its guard and tightening security ahead of the Olympic Games in Rio de Janeiro after the recent attacks in Paris and Brussels and a threat by an alleged Islamic State militant.
"A bell went off in terms of terrorism," Admiral Ademir Sobrinho, the chairman of Brazil's joint chiefs of staff told Reuters, adding that Brazil has ramped up cooperation with foreign governments to prevent possible attacks from radical groups such as Islamic State or from a lone wolf.
With the Olympics set to start Aug. 5 and Rio expecting as many as 600,000 foreign visitors, Brazil is sharing intelligence, conducting security drills and setting up joint facilities.
In addition to a police hub where officers from over 50 countries will help monitor security at the Games, Brazil will also operate an anti-terrorism centre with experts from nations including the United States, Britain, France and Spain.
"We'll have people there from around the world to better share information and advise one another on their respective areas of expertise," says Andrei Rodrigues, a police inspector who heads a special secretariat the federal government established for security during big events.
It is not that Brazil wasn't preparing for terrorism before. But after years of hosting big events, like giant annual Carnival celebrations and the football World Cup in 2014, security officials didn't consider it the biggest concern.
With no political enemies, no recent history of war and no evidence of homegrown militants to threaten it, Brazil focussed mostly on the street crime and violence that are everyday problems here.
Even at the World Cup, which was held successfully in 12 different cities, the biggest fear was a rekindling of mass protests that erupted across Brazil a year earlier because of corruption and a slowing economy.
But the attacks that killed 130 people in Paris last November and 32 in Brussels in March forced a reassessment by Brazil's security forces. An anti-terrorism effort is now at the heart of their planning for the Olympics.
Security experts are scouring social media, foreign intelligence reports and immigration records for red flags on suspected militants, their networks and their movements the world over.
They have been working closely with foreign governments on readiness drills for scenarios ranging from a Paris-style assault at nightclubs or restaurants to a biological attack.
So far, security officials familiar with the so-called intelligence "chatter" about the Olympics say no credible terrorist threat has been detected.
One blatant warning came in November, when an alleged Islamic State operative claimed that one of the group's "wolf packs" was already in Brazil.
Though it caused alarm in security circles, and wasn't publicly acknowledged by Brazilian security sources until months later, further investigation led officials to believe it was mostly bluster.
"It's not so surprising with an event of this nature that someone would be out there bragging," says Saulo Moura da Cunha, a director at Brazil's National Intelligence Agency.
Officials say the most difficult threat to detect is that of an individual or a small group inspired by but not necessarily affiliated with the organised factions that intelligence agencies know best.
"One person can cause a lot of damage," says Jose Mariano Beltrame, Rio's state security secretary, "and you need to operate at a micro level to get ahead of it."
Longstanding concerns about potential terrorist breeding grounds in Brazil have until now proven hollow.
Despite hand-wringing about an influx of more than 2,000 Syrian refugees in Brazil, six of whom were caught last year traversing Central America with false passports as they sought to reach distant family, security officials say they have no credible evidence that terrorists might be among them.
And years of investigations by police and intelligence agencies have yielded no signs of terrorists in the notorious "triple-frontier" region along Brazil's borders with Paraguay and Argentina.
Although the region is well known for contraband commerce and as a centre for Arab immigrants in the middle of the 20th century, rumoured links between area merchants and Islamist militants have never been proven.
Brazil clearly has vulnerabilities. Its vast borders, more than 10,000 miles (16,000 km) shared with 10 other countries, are more than five times longer than the U.S. border with Mexico. Much of it, remote jungle, is unprotected.
An ongoing recession and budget shortfalls mean security forces lack funding, including in Rio, where some precincts are so strapped that neighbours donate office and cleaning supplies.
But the government is sparing few resources for the Olympics.
For visitors, the most obvious sign of security will be patrols by 85,000 police and soldiers, a massive deployment more than twice the size of that for the 2012 Olympics in London.
Between the justice and defence ministries, which together are footing most of the bill for security, Brazil's government has spent more than $640 million on preparations.
Security experts say the many boots on the ground will be useful in terms of deterrence. The Paris attackers, for instance, would likely have killed many more in November had police perimeters around a stadium hosting an international football match not prevented one suicide bomber from entering.
"It's a souped-up response that may seem disproportionate but is helpful in terms of minimizing risk," says Robert Muggah, research director at the Igarapé Institute, a security and development think tank based in Rio.
Brazilian authorities believe the Olympics will in many ways be more challenging than the World Cup.
Compared with individual games on separate days in different cities for the football tournament, the Olympics involves sustained multi-sport competitions from dawn to dusk across a city that is chaotic even on normal days.
"The complexity and size of the event are bigger and so, then, must be the security effort," says Rodrigues, from the special secretariat.
(Reporting by Paulo Prada; Editing by Kieran Murray)