Two retired soldiers have been arrested after confessing to stealing rifles that sparked a huge 10-day military recovery operation, Brazil's army says.
Some in Brazil want a bigger military role to tackle the violence
The two officers are accused of taking 11 weapons from an army barracks at the beginning of the month.
The army also believes a gang from Rio de Janeiro's shantytowns are involved.
Around 1,500 troops backed by tanks and helicopters were deployed into the city's slums in the hunt for the stolen weapons. They pulled out on Tuesday.
The occupation led to daily shootouts with armed drug gangs which left several people injured.
The 10 rifles and a pistol - looking rusty and with their serial numbers filed off - were recovered in a wooded area near the Rocinha shantytown, the army said.
One former corporal confessed that he and another ex-soldier, along with five gang members, stole the weapons, the government's Agencia Brasil reported.
The massive operation into Rio's notorious shantytowns has sparked a debate in Brazil about the extent of military involvement in fighting drug-related violence, correspondents say.
Human rights groups want to see more community policing to reduce the high levels of violence in the deeply divided city.
Amnesty International and other groups have condemned what they call the military-style tactics of Rio's police, which they say include using a special armoured vehicle to drive into the slums, shooting at random, and using loudspeakers to intimidate the population.
But some Brazilians say they would welcome a bigger military role in what is one of the world's most violent cities.
The army's General Helio Macedo Junior said in a televised interview that the military would return to the slums if it was needed, but "nothing like last week".