RIO DE JANEIRO (AP) - Police in Rio de Janeiro raided the Vila Cruzeiro favela before dawn Tuesday. setting off a fierce firefight that authorities said killed more than 20 people.

The operation was aimed at locating and arresting criminal leaders, some from other states, police said in an early statement.

The statement, issued Tuesday morning, said that officers were fired on while preparing their incursion and that one resident had been shot and killed on site. Local press reported that person was a 41-year-old woman hit by a stray bullet.

The police statement said 11 people also were found wounded after the shootout and taken to a nearby state hospital. But as the day wore on, residents used cars to carry more gunshot victims to that same hospital - most of whom were already dead.

By late Tuesday, 21 corpses had arrived at the hospital and seven people were receiving treatment for injuries, the state's health secretariat said in an emailed statement.

That makes the incident one of Rio's deadliest police operations in recent history. It comes one year after a raid of the Jacarezinho favela that left 28 people dead, prompting claims of abuse and summary executions. The episode sparked protests and also reignited debate over the proper use of police force in Rio, where a common local saying is, “A good criminal is a dead criminal.”

Just weeks after the Jacarezinho raid, a stray bullet hit a young pregnant woman during a shootout between police and alleged criminals in another favela, and her death caused further outrage.

Earlier this year, Brazil's Supreme Court established a series of conditions for police to conduct raids in Rio's favelas as a means to reduce police killings and violations of human rights. The court ruled that lethal force should only be used only in situations in which all other means have been exhausted and when necessary to protect life, and gave police 180 days to install devices to record audio and video on their uniforms and vehicles.

Authorities on Tuesday had sought to intercept the gang's members outside the neighborhood, which wasn't possible after police began taking fire, Uira do Nascimento Ferreira, leader of the military police's tactical unit, told reporters at a news conference in Rio.

Outside the hospital, residents of Vila Cruzeiro mourned the loss of family and friends while some protested.

Rio state public prosecutors said in a statement they had opened a criminal investigation. They gave the military police 10 days to provide details about the operation, indicating which officials were responsible for each death and the justification for use of lethal force, the statement said.

The operation was conducted jointly by the military police and federal highway police. Police seized 16 vehicles, 13 automatic rifles as well as pistols and grenades, the police statement said.

Associated Press writer Diane Jeantet contributed to this report.