Thousands of Brazilian troops have raided Rio de Janeiro favelas in a pre-dawn crackdown on criminal gangs, leaving parts of the city looking like a warzone.

Five favelas were targeted by police and 3,600 troops in a swoop that started at 4am local time (07:00 GMT) on Saturday, the Rio state security service said in a statement.

Officials said their main goal was to stop the gangs behind a surge in robberies of commercial trucks, but residents said the raids created more tension and fear.

Rio state authorities said there were 10,000 cases of cargo theft last year.

As part of the raids, 40 arrest warrants were issued.

READ MORE: Congress rejects corruption charge against Michel Temer

Al Jazeera's Daniel Schweimler, reporting from Rio de Janeiro, said the troops in action on Saturday were part of the 8,500 soldiers deployed to the city last week to curb a surge in violent crime after the end of last year's Olympics.

At least 18 were arrested and soldiers confiscated a small cache of weapons, he said.

Scores of heavily armed soldiers in camouflage, rows of jeeps and armoured personnel carriers could be seen in the Lins favela, one of the many little-regulated shanty towns that dot the city's forest-clad hills.

'Tension and fear'

Troops stood guard with their fingers on the triggers of assault rifles, while units of soldiers and SWAT police roamed the streets, pointing their weapons out of car windows.

All those entering and leaving the favela were subjected to identity checks and searches, with men required to lift their shirts.

Favela residents, who woke up to shooting, said they felt no safer by the operation.

"There's an atmosphere of tension and fear," Vanuza Barroso da Silva, who was going to her job at a supermarket, told the AFP news agency. "People can hardly get to work."

Al Jazeera's Schweimler said residents fear that Saturday's raid is just one more in a long series of dramatic, but ultimately futile actions to curb crime.

"Deploying troops is a standard response by authorities," he said.

"But experts say what is needed is fundamental change, such as measures to alleviate poverty and stifle gangs."

Brazil's favela residents lack many basic rights and services.

In the first half of this year, there were more than 3,450 homicides in Rio, according to officials.

People are killed daily in gun battles between rival gangs competing for control of the favelas or from police action.

Since the beginning of the year, 93 police officers have also been killed in Rio state.

Officials said the other favelas targeted were Camarista Meier, Morros de Sao Joao and Engenho Novo in the north and Covanca in the west.

"The armed forces are responsible for the perimeters in some of these regions and based at strategic points," the state security service said.

"Some roads are blocked and the airspace is restricted to civilian flights over the sectors where the armed forces are operating."

Rio's airports, however, were not affected.