President Vicente Fox on Thursday condemned a violent uprising by residents that left a teenager dead and dozens of people, including police officers, wounded in a rebellious town outside Mexico City.

Hundreds of police officers fired tear gas and crashed through human barricades to take control of San Salvador Atenco just before dawn Thursday, hours after protesters released six badly beaten police hostages.

CountryWatch: Mexico

The clashes began when inhabitants attacked police in response to the arrest of several of their companions at a market in the nearby town of Texcoco. The residents of San Salvador Atenco have a history of clashing with authorities, including a successful 2002 fight to block construction of an airport in the area.

Television broadcasts showed officers repeatedly beating protesters, including some who already had been taken into custody.

Mexico's National Human Rights Commission said it is investigating the beatings.

"The regrettable, violent acts perpetrated by a small group yesterday in the State of Mexico are an outrage against society and an attack on the rule of law," President Vicente Fox said Thursday. "No cause justifies breaking the law."

Fox pledged to "guarantee the rule of law," though earlier, violent demonstrations by the same group of townspeople here have largely gone unpunished.

Authorities detained 117 people, including key community leader Ignacio del Valle, said Humberto Benitez, secretary-general of the State of Mexico, which borders Mexico City on three sides.

Del Valle and a fellow resident of San Salvador Atenco were charged with the February kidnapping of a state official, said Carlos Mota, spokesman for the Mexico State Superior Court. Mota said del Valle was likely to face charges related to Wednesday's violence as well, although no specific charges had been presented yet.

Shortly before midnight Wednesday, radical community leaders called Red Cross officials to a small clinic near the center of town and released the six state and federal police officers they had seized hours earlier. Organizers said it was a gesture of good will since all of the former hostages were injured — having been beaten and some sliced with machetes.

A 14-year-old Atenco resident was killed during Wednesday's pitched battles, but circumstances surrounding the death were unclear, Benitez said.

Television images from helicopters overhead showed residents repeatedly punching and kicking a semiconscious officer, a beating that continued even after he had been put inside an ambulance that was taken over by local residents.

Mexican media reported that 33 police officers were injured.

An Associated Press photographer was bruised on his head and body after being clubbed Wednesday by a group of police officers who were trying to keep him from taking pictures. He was not seriously injured, however. Police also beat and tackled at least one cameraman from the Mexican Televisa network.

Rebel leader Subcomandante Marcos said that the Zapatista Liberation Army of southern Mexico would go on red alert to support Atenco residents.

The Zapatistas staged a brief armed uprising in southernmost Chiapas state in January 1994 to overthrow the government and demand Indian rights. Since then, the movement has been aimed more at political organization than at armed rebellion.

Atenco, 15 miles (25 kilometers) northeast of Mexico City, was once planned as the site of a new international airport.

But the government backed off that plan after a series of violent protests in July 2002.