At least nine people were trampled to death and two others were injured early Sunday in the chaotic aftermath of a police raid in a poor Sao Paulo neighborhood, authorities there said.
Residents blamed the police for causing the panicky stampede, local media reported.
The dead included a woman, seven men and a 14-year-old boy, Lieutenant Colonel Emerson Massera, a police spokesman, told reporters.
He said a unit of 38 military police had carried out an operation in the southern favela of Paraisopolis when two men on a motorcycle fired at the troops before fleeing in the direction of a nearby street party, where they continued firing, sparking the stampede.
He said some 5,000 people had gathered for a "funk dance," a weekend street party popular in poorer districts of Sao Paulo and Rio de Janeiro.
- Neighbors demand justice -
But the mother of a 17-year-old girl injured in the incident told the website G1 that the police were to blame.
She said police sparked the stampede after they closed a street, lobbed pepper-gas canisters and fired rubber bullets.
"It was a policeman who attacked my daughter with a glass bottle," said the woman, who did not give her name.
She went on: "When I saw her, I didn't recognize her. Her face was deformed, and she lost a lot of blood."
Globo television broadcast a video showing a person being kicked by a policeman, and said it had been filmed by a favela resident.
The Paraisopolis neighborhood association denounced the police action.
"Early this morning, young people were cornered in alleyways and killed," it said in a statement on social media. "We demand justice."
Paraisopolis is one of Sao Paulo's largest favelas, with 50,000 inhabitants. Many of them live in ramshackle houses along unpaved streets lacking basic services.
Locals defend the funk dances as an important outlet for the young.
But police spokesman Emiliano da Silva Neto said the parties provide cover for crime and illicit drug use, adding, "It's out of control."
Massera said that as police chased the two shooters into the street where the party was underway, they were met with a hail of stones and responded with tear gas, rubber bullets and stun grenades.
Da Silva Neto said all those who died had been trampled, and none had been shot.
The military police have launched an investigation.