MEXICO CITY - Organized criminals in the troubled Mexican state of Michoacan were suspected of unleashing a series of attacks on government forces Tuesday that resulted in the deaths of 20 criminals and two federal police officers, according to the federal government.

The brazen attacks, which also left 15 police officers injured, underscored the challenge the Mexican government faces in a southwestern state that, while long plagued by outlaw groups, has suffered from intense new waves of cartel violence.

The conflict is detracting from President Enrique Peña Nieto's effort to steer the world's attention away from Mexico's drug war and toward the country's economic potential.

The instability in Michoacan ratcheted up in recent months as armed "self-defense" groups rose up to fight off the state's dominant cartel, the Knights Templar, who, in addition to their drug operations, have engaged in a widespread campaign of extortion, rape and killings of everyday citizens.

Peña Nieto, who took office in December, sent thousands of federal troops to Michoacan in May in an effort to quell the violence, his first major military offensive against the drug gangs.

A statement late Tuesday from the Mexican Interior Ministry said that federal police units in various parts of the state were subjected to six "pre-planned" attacks carried out by "individuals with large arms hidden in the hills."

The attackers also set up a number of roadblocks, using buses and other vehicles.

"In all of the cases, authorities repelled the aggressions to return order to the areas," the statement said, adding that federal police and military units were searching for the shooters.

The attacks came a day after another bloody incident in the city of Los Reyes, in the western portion of the state. A group of citizens, among them members of a self-defense group, marched on city hall, apparently to protest the influence of the Knights Templar. Gunmen opened fire on the group, killing five people and injuring seven, according to the state government.

On Thursday, three other federal police were slain and six wounded in an ambush near the border with the state of Guerrero. On Friday, the bullet-riddled bodies of two men and two women were found hanging at the entrance to the city of El Limon de La Luna, in the agricultural municipality of Buenavista Tomatlan, home to some of the worst fighting between citizens and the Knights Templar.

In some cases, the federal authorities have been working with the armed vigilante groups, even co-staffing security checkpoints. But there is also some concern that the self-defense groups have been infiltrated by a rival cartel.