Police incensed by investigations of brutality and corruption by "bad" cops may have carried out a massacre in two impoverished suburbs of Rio de Janeiro (search), killing 30 people, state officials said Friday.

Another victim was left brain dead in Thursday's onslaught in Nova Iguacu (search) and Queimados (search), crime-infested suburbs 20 miles northwest of Rio, said Claudia Guerreiro, a spokeswoman for the Rio Public Safety Department.

In Queimados, gunmen mowed down 12 people, some in Bible Square and others in front of a car wash, she said. In nearby Nova Iguacu, they killed 15 people at a bar, she said.

"There are strong indications that the massacres could have been a reprisal ... for the arrest of eight police officers suspected of killing two men in police station" earlier this week, Guerreiro said.

The eight were caught on camera dumping the bodies of the two men outside the station, Guerreiro said.

Marcelo Itagiba (search), head of the Rio de Janeiro State Public Safety Department, said authorities were investigating whether police participated in Thursday's suburb slayings and if so, "we will be implacable."

He said the massacre may have been the work of people "unhappy with our investigations into crimes committed by police officers and with our efforts to weed out corrupt and bad policemen."

One victim was 13-year-old Felipe Soares Carlos, who had had just returned from school.

"He went out to play with his friends and minutes later I heard shots," said his 17-year-old sister, Priscila. "I went out and saw a lot of bodies stretched out on the street and then I saw my brother. I touched him and his eyes rolled over and I knew he was dead."

"One minute you see all these kids you have known for years playing in the street and the next minute they are all dead," said Maria Jose, who owns a neighborhood bar. "It was shocking."

Sobbing families of the victims flocked to the Austin Cemetery in Nova Iguacu for the funerals that began late Friday. Many held up pictures of their slain relatives, who ranged in age from 13 to 64.

"He went to get cigarettes. I heard shots and went to see what happened. My son was dead," said Rosa Maria Silva, whose 19-year-old son Jonas was among the victims.

Several lawmakers also attended the funeral. "Experience has shown that this type of crime is always carried out by the underworld of the police apparatus," said Jorge Piciani, president of the Rio de Janeiro state assembly.

The human rights group Amnesty International said the killings were reminiscent of massacres by Rio death squads.

Twelve years ago, death squads killed eight street children while they slept outside Rio de Janeiro's Candelaria church. A month later, 21 people in Rio's Vigario Geral shantytown were gunned down, apparently in retaliation for the killing of police allegedly involved in drug dealing.

Rio de Janeiro is one of the world's most violent cities, with a homicide rate of around 50 per 100,000 residents.