Updated

A pair of shootouts between troops and gunmen in northern Mexico have killed 13 people, including a bystander and a drug trafficker linked to the killing of a retired army officer.

Navy spokesman Adm. Jose Luis Vergara said troops were searching a villa Friday in a suburb of Monterrey named Juarez when they were ambushed by a group of heavily armed men. Eight gunmen were killed and nine more were arrested in the initial shootout, Vergara said.

Television images showed a garden littered with bloodied corpses. Several handcuffed men sat on the ground with shirts pulled over their heads and a line of automatic rifles nearby.

Vergara said soldiers had gone to the villa to check an intelligence report that suspected drug trafficker Ricardo Almanza Morales was there. He said one soldier was wounded and is in stable condition.

Almanza Morales, killed in the attack, was accused of working for the Zetas, drug traffickers who also serve as enforcers for the Mexican Gulf cartel, and of killing army Brig. Gen. Juan Arturo Esparza and his four bodyguards in a November attack.

Esparza was killed shortly after he was named police chief in the Monterrey suburb of Garcia. Five Garcia police officers were among 10 people arrested in Esparza's killing.

Nuevo Leon state Attorney General Alejandra Garza y Garza said in Monterrey that a second shootout that left five people dead ensued when gunmen in at least 10 Sport Utility Vehicles heading to the villa, presumably to rescue those detained, ran into a military convoy.

During that shootout, one of the gunmen's cars burst into flames. Three people inside died, Garza y Garza said. Television images showed three charred bodies, two of them with their hands tied behind their backs.

Garza y Garza said the driver was a drug trafficker and the other two apparently were drug dealers who had been kidnapped. A fourth body was found about 165 feet (50 meters) from the burning vehicle. A woman who was driving near the shootout was killed by a stray bullet and two other bystanders were wounded, he said.

Seven people were arrested during the second clash, Garza y Garza said.

Hours after the shootouts, gunmen suspected of working for the Zetas attacked a detention center in Monterrey suburb of Escobedo, killing two federal police officers guarding it and freeing 23 inmates, 15 of them members of a kidnapping gang working for the Zetas and the eight others were suspects detained in robbery investigations, he said.

Local media reported some of those rescued were local police officers working for drug traffickers, but Garza y Garza did not say if police were among those freed.

The attack on the detention center "was a reaction to the (soldiers') raid and their intelligence work," Garza y Garza said.

Confrontations between soldiers and drug traffickers have grown more frequent in Monterrey, Mexico's wealthiest city, as troops fight drug dealers and corrupt police officers helping drug cartels.

Drug-fueled violence has cost more than 14,000 lives across Mexico since President Felipe Calderon sent troops to crackdown on cartels in late 2006.

Also Friday, all eight government officials including the mayor of the town of Tancitaro, in Michoacan state, resigned to their posts alleging they have been threatened by drug traffickers and none of the local police officers showed up to work.

Tancitaro Mayor Jose Meza couldn't be reached, but the state congress called an emergency meeting to discuss the government situation in the town of 26,000 people.

The town is in a drug-plagued area and in March the top city council member, Gonzalo Paz, was kidnapped, tortured and killed. Soldiers have destroyed more than 20 meth labs so far this year in the town and several police officers have been killed by drug traffickers.

In southern Guerrero state, gunmen killed three police officers and injured four others, authorities said.

Public security officials in the Pacific coast state of Guerrero said in a statement Friday that the officers fired back after shooters opened fire Thursday evening in the town of Coyuca de Catalan. Two federal police officers, one state police officer and two of the gunmen were killed, it said.

The bodies of five men with gunshot wounds also were found Thursday in Guerrero, authorities said.