MEXICO CITY – Turnout was low, but not as low as feared. The vote Sunday took place against a backdrop of sensational violence, including four bodies hung from a bridge. One gubernatorial candidate was assassinated a week ago. A major state candidate from Cancun was in prison, charged with aiding the drug cartels. But all in all, the 2010 elections in Mexico were relatively calm.

Both major parties claimed victory in the state and local elections.

President Felipe Calderon’s center-right National Action Party, or PAN, appeared from preliminary results to have fought back a surge by its main opponent, the Institutional Revolutionary Party, or PRI, which ruled Mexico for 71 years as a soft dictatorship of crony capitalism, vote-stealing and political patronage.

The PRI lost control of the federal government in 2000 with the election of PAN’s Vicente Fox as president, and it lost again in 2006, when Calderon was elected by a razor-thin margin over a candidate from the left, Andres Manuel Lopez Obrador, who continues to call himself the “legitimate president.”

The elections Sunday were seen by analysts as a warm-up for 2012, when the PRI hopes to take back Los Pinos, the Mexican White House. Some U.S. anti-drug officials fear that a return of the politically pragmatic PRI could crimp the partnership between Mexico and the United States in the battle against the drug cartels.

The PRI won nine of the 12 governor’s races Sunday, maintaining power in states it already controls. Beatriz Paredes, the PRI national president, said her party is now the dominant force in Mexican politics.

But Calderon’s party made advances. Employing crazy-quilt political alliances — by patching together left- and right-wing parties in temporary marriages of convenience and by running popular figures — PAN appeared to have won in the states of Sinaloa, Puebla and Oaxaca.

The PRI held on to the governor’s seat in Chihuahua and took the border cities of Tijuana and Ciudad Juarez.

The party also won in the northeast state of Tamaulipas, where the winner was the brother of a PRI candidate slain last week by commandos impersonating Mexican marines, and in the Caribbean state of Quintana Roo. There, the PRI candidate beat his challenger from the left, who is in federal prison awaiting trial on drug charges.

The PRI defeat in Oaxaca drew big headlines in Mexico. The PRI has ruled the heavily indigenous state with an iron fist for 80 years. The PRI candidate in Sinaloa also lost.