By Luis Enrique Martinez

ACAPULCO, Mexico (Reuters) - Angry teachers on Wednesday attacked offices of Mexico's main political parties in the capital of the southwestern state of Guerrero to protest against an education overhaul, breaking windows, spray-painting walls and starting fires.

Dozens of teachers opposed to President Enrique Pena Nieto's new education reform ran riot in the city of Chilpancingo, trashing installations of his Institutional Revolutionary Party (PRI) and the main opposition parties.

Police were nowhere to be seen.

Television footage showed masked protesters throwing chairs, papers and plants out of the upper floors of the PRI offices in Chilpancingo as others destroyed images of Pena Nieto and sprayed colorful graffiti about him on the walls of buildings.

Teachers in Guerrero, home to the popular beach resort of Acapulco, are fighting the legislation that aims to revamp the country's failing education system by imposing tougher oversight of teaching standards and cracking down on abuses.

The law takes away control of teacher assessment from a powerful teachers union and seeks to end the practice of teachers passing on posts to relatives or simply selling them.

Teachers have been one of the most militant groups in Mexico in recent years, periodically causing major disruptions in some states during efforts to force through change.

"We need to avoid the law of the jungle imposing itself, chaos and the breakdown of public order," PRI chairman Cesar Camacho said, pledging to investigate the unrest.

Images from Milenio Television also showed protesters armed with sticks attacking offices of the conservative National Action Party (PAN) and the leftist Party of the Democratic Revolution (PRD), which also backed the education reform.

The footage showed people had set fire to a building next to the PRI complex. It was unclear if it belonged to the party.

Milenio's website quoted Chilpancingo Mayor Mario Moreno as saying the city lacked the means to take on the protesters. "We've already asked for federal assistance," he said.

Previous demonstrations in Guerrero have shut down main roads in the state, which is already suffering from a wave of violence that spawned vigilante-style "community self-defense" groups.

The groups have taken the law into their own hands, rounding up who they see as suspects, including police, and prompting criticism the government is no longer in control of some areas.

Guerrero state police said elements from the self-defense groups were among the people attacking the political offices.

The protests in Chilpancingo kicked off after Guerrero's state congress on Tuesday rejected demands from the teachers to amend the education bill, which involves constitutional changes that must be approved by Mexico's state legislatures.

To escape disruption from the protests, the state congress moved this week to Acapulco, which last year became the murder capital of Mexico with more than 1,000 homicides reported.

Pena Nieto signed the education law in February. Lawmakers must still draw up separate legislation to implement it.

(Additional reporting by Gabriel Stargardter; Writing by Dave Graham; Editing by Simon Gardner and Mohammad Zargham)