A child walks off with a pack of toothpaste she took from a cargo truck allegedly set on fire by drug traffickers, in Rio de Janeiro, Brazil, Tuesday, May 2, 2017. Several public buses and cargo trucks were torched in Rio de Janeiro on Tuesday in what Brazilian military police said was likely gang retaliation for a large anti-drug operation. (AP Photo/Silvia Izquierdo)

A child walks off with a pack of toothpaste she took from a cargo truck allegedly set on fire by drug traffickers, in Rio de Janeiro, Brazil, Tuesday, May 2, 2017. Several public buses and cargo trucks were torched in Rio de Janeiro on Tuesday in what Brazilian military police said was likely gang retaliation for a large anti-drug operation. (AP Photo/Silvia Izquierdo)

RIO DE JANEIRO (AP) — Military police launched a major anti-crime operation in northern Rio de Janeiro on Tuesday, arresting dozens of men and confiscating automatic rifles in a sweep that led gang members to burn public buses and left the city that hosted last year’s Olympics on edge.

The operation, which included periodic shootouts between police and gangsters, began in the morning. By afternoon, 45 men were under arrest and dozens of weapons, including automatic rifles and grenades, had been seized, authorities said. Three officers and two gang members were injured.

In retaliation, members of the gang targeted by the sweep set fire to several buses and two commercial trucks. Buses burned for hours alongside a highway, snarling traffic with heavy black smoke as a military helicopter hovered overhead.

ADVERTISEMENT

Residents of the district swarmed over one of the commercial trucks after flames subsided and carried away toothpaste and other goods they could salvage from the charred trailer as armed military police looked on.

There were no immediate reports of injuries.

Roberto Sa, security secretary for Rio de Janeiro state, said the offensive was intended to stop an incursion by one drug gang into another’s territory.

“We are not going to occupy (the area), but we will keep a strong presence,” Sa told reporters at a news conference.

The burst of violence comes amid worries over rising crime in Rio, which hosted the 2016 Summer Olympics. Several buses were torched during a protest over pension reforms Friday, and earlier last week several people were killed during shootouts between criminals and police in Alemao, one of the city’s largest slums.

Rio has frequent bursts of violence. Heavily armed gangs run drug businesses from many of the hundreds of slums in the city. They frequently shoot it out with rival gangs over territory and engage in gunbattles with military police during operations.

With Brazil suffering from a severe recession, some studies suggest 2016 was Rio’s most violent year in decades despite a police pacification program that was meant to curb slum violence.

Crime appears to be on the rise. In January and February, homicides rose 17 percent and 24 percent, respectively, from the same months a year earlier, according to Rio state government crime statistics