Brazil is fine-tuning its security apparatus to contain endemic violence during next year's football World Cup and ensure the safety of the hundreds of thousands of people who will visit the country during the planet's most-watched sporting event.
"Public safety is a major preoccupation but we have put in place a strategic plan that we are currently perfecting," Valdinho Caetano, the secretary in charge of major events at the ministry of justice, told AFP.
Launched in August 2012, the plan defines the most important zones to protect, coordination between public and private security firms and evaluates the main threats from organised crime, terrorist attacks and football hooliganism.
The plan will be put into action for the Confederations Cup, which starts on Saturday in the capital Brasilia, and runs until June 30 and is seen as a dress rehearsal for the main event in 12 months' time.
"No mistakes will be tolerated," Caetano warned.
-- An epidemic of violence --
Brazil's average homicide rate is 27 for every 100,000 inhabitants, according to the last available figures from 2010, said Julio Waiselfisz, who compiled the Map of Violence study.
With a rate of more than 10 homicides in 100,000, the 12 host cities of the World Cup next year have an "epidemic situation", Waiselfisz said.
"And like every epidemic (violence) increases and spreads," he added.
Salvador de Bahia in Brazil's northeast is the most violent of the 12 cities with a homicide rate of 69 in 100,000 compared with 27.9 in Rio de Janeiro -- rates comparable to the most dangerous African or Latin American countries.
In Rio, the government in 2008 began a race against the clock to secure the city and expel the drug gangs in the favelas or shantytowns in tourist areas.
To date, 32 police security units have been deployed in 179 of the city's 750 favelas. Between now and next year, 12,500 police officers will be mobilised in 40 units.
But episodes of recent violence have set alarm bells ringing, such as the rape of a young American woman in a minibus in Copacabana and shots fired at tourists in the Rocinha favela.
An engineer was seriously wounded last weekend when shots were mistakenly fired into his car in a northern favela that has yet to come under police control.
"We're sure that these types of incidents will not happen during the World Cup," Caetano said, pointing out that cities like Rio are used to organizing large-scale events such as the annual carnival without major incidents.
-- Terrorism specialists --
Brazil's authorities believe that the probability of a terrorist attack is "very low", the under-secretary responsible for major events, Roberto Alzir, told the foreign media last Friday.
More than 50,000 police officers and 25,000 security guards will be mobilized during the World Cup to deal with any threat.
Some 5,000 police officers have been trained by agents from the US Federal Bureau of Investigation (FBI) to respond to external threats and crowds.
The army also has anti-terrorist and chemical weapons specialists.
The police presence "will be reinforced even more on match days involving teams from countries which present the greatest risks of terrorism," Alzir stressed.
Drones will fly above match venues in Brasilia and Rio for the opening and closing matches of the Confederations Cup while some 34 armored ground-to-air defenses will be in place to protect a seven-kilometre (4.3-mile) perimeter around grounds.
Brazil is equipped with 15 US bomb-disposal robots, which will be in place in the six Confederations Cup cities and all 12 host cities for the World Cup.
Airports, too, will be under tight surveillance.
At grounds, fans will be banned from taking in cans of alcohol, flag poles and drugs.
The authorities have even banned the "caxirola" -- the Brazilian equivalent to South Africa's vuvuzela trumpets -- which have been thrown onto the pitch during matches.
The ban on the plastic instruments, which resemble maracas, will be in place for the Confederations Cup.