Police on the outskirts of Rio de Janeiro, Brazil, have taken over a poor neighbourhood following the discovery of the mutilated bodies of six teenage boys.

Their bodies were discovered by workers in a ditch alongside a busy highway, police said, and at least one other boy is missing.

A military police cadet and a local pastor were beaten and killed over the weekend, likely by the same gang, police said.

Police believe drug traffickers who have moved into the region after being forced out of central Rio by a Brazilian security crackdown ahead of the World Cup and 2014 Olympics are responsible.

The boys, who all grew up together on a nearby street, had gone for a swim at a waterfall in a park near the highway on Saturday but never returned.

A police investigator said all six, aged 16 to 19, had been shot in the arms and legs, their limbs fractured and they had cuts on their necks. Police believe the traffickers may have mistaken the teens for members of a rival gang or as a warning to the local population.

Families called to the ditch to identify the bodies were overwhelmed with grief.

"My son didn't smoke, drink or take drugs," a mother sobbed. "None of the boys did."

Yesterday afternoon, a teacher at a local high school said terrified parents rushed to take their children home after the students began getting cellphone messages warning the traffickers were coming.

Early Tuesday, troops backed by armoured vehicles moved in to the favela or shantytown of Chatuba as "an immediate response to the barbarous acts committed here and to the clamour from the local people who don't want to be held prisoner by these thugs," police spokesman Frederico Caldas told CBC News.

Despite their fear, hundreds of residents turned out for a memorial and funeral service for the six friends on Tuesday.

"They were just innocent kids," one mourner said. "They were always happy and never hurt anyone — and now they're dead."