Rio de Janeiro (AFP) - The risk of a terrorist attack is the main security fear at the Rio Olympics, a top official said, with the Paris attacks highlighting the potential for Brazil to be sucked into conflict for the first time with Islamic extremists.

"Terrorism is the number one worry," Jose Mariano Beltrame, the security chief for the state of Rio de Janeiro, told a news conference. "Brazil does not have a history of terrorism, but always works with this priority."

With a low profile in international conflicts and no connection to US and European entanglements in Afghanistan, Iraq and Syria, Brazil has never been targeted by Islamist groups.

However, the simple fact of world leaders being present at the Rio Olympics next August, coupled with the massive media coverage, risks pulling Latin America's biggest country into the crosshairs.

Beltrame said "we receive bulletins on possible threats..., but we have the means to boost our forces where necessary."

"We are ready. Every institution knows what to do. We want a gold medal in security."

A huge number of security personnel will be deployed for the games: between 60-65,000 police officers and soldiers, and another 15,000 in reserve. This doubles the number of security used at the 2012 London Games.

- More training needed -

French police -- with the horror of last week's massacres by Islamist bombers and gunmen in Paris fresh in their minds -- began training elite Brazilian counterparts in crowd control Thursday.

Dozens of Brazilian officers in Rio with state-of-the-art anti-riot gear, including fire-proof balaclavas, gas masks, stun grenades and tear gas, showed off their techniques for subduing violent mobs.

In normal times, a riot would be the worst thing expected to happen at a major sporting event like the Olympics, which open on August 5.

But in the wake of the Paris attacks, including at a France-Germany football game, the focus of the long-scheduled session abruptly switched to a much darker scenario.

Story continues

"There is a real possibility of a terrorist attack due to the high visibility," said Colonel Andrei Silva, with the Brazilian police force's Shock Battalion, at their Rio headquarters.

"We have to prepare more," he told AFP. "We definitely don't want this to happen in Brazil."

Brazil's police have much experience in fighting well-armed drug traffickers in city favelas, but are often accused of human riots violations, including extrajudicial executions.

The French had come to teach them "democratic management of crowds," Antonio Marcalo, with the CRS, said. "We try to help them with tactics that are a little more democratic."

The demonstration exercise involving an assault by about 20 hulking riot police with batons and stun grenades against a lone colleague posing as the supposedly disorderly crowd seemed rather to favor more robust Brazilian methods.

After being gassed, stunned and eventually surrounded, the solitary protester was carried away in a horizontal position.

- Change in agenda -

France's Lieutenant Anne-Christine Poinchon pointed out that the CRS does not have specific anti-terrorism expertise and had arrived in Rio on what had been planned as a routine training session.

However, with attacks on such a large scale as in Paris -- where assailants did the most damage with widely available and easily used automatic rifles -- the stakes are rising for security services of all kinds, including the CRS and Shock Battalion.

"We arrived right after the Paris attacks so we're getting a lot of questions about terrorism," Poinchon said.

"The Brazilian authorities take what happened in France very, very, very, very seriously and are very keen to get our information so they can prepare to a maximum."

Poinchon said Silva, the Shock Battalion colonel, had already been in talks with France's specialist anti-terrorism unit RAID.

"Historically Brazil has not had any terrorist act. We hope that will continue," Silva said. "But to hope is not enough anymore."