Mexico's ruling party claimed an early advantage in hard fought regional elections on Sunday, battling widespread anger over corruption and gang violence against a fragmented opposition in a race that may set the tone for the 2018 presidential contest.

President Enrique Peña Nieto's ruling Institutional Revolutionary Party, or PRI, had a clear lead in at least two of a dozen states up for grabs, and an advantage over rivals in several others, exit polls showed. Some were too close to call.

The elections pose a major test for PRI hopes of retaining the presidency in 2018 in the face of deep discontent over graft scandals and a sluggish economy that have made a fiery leftist former mayor of Mexico City looking like the man to beat.

PRI party chairman Manlio Fabio Beltrones said exit polls showed his party was leading in 11 states, but he conceded it would be a nail-biting finish in several. The PRI held nine of the 12 states heading into Sunday's vote.

The biggest prize on offer is oil-rich Veracruz in the Gulf of Mexico, the third most-populous state, which has been long dominated by a few families in more than 80 years of PRI rule.

An initial exit poll by newspaper El Financiero showed the PRI candidate, Héctor Yunes, just ahead of his cousin and rival Miguel Ángel Yunes, who is fronting a joint bid by the main center-right and center-left opposition parties.

Cuitláhuac García of the new National Regeneration Movement, or Morena party, of two-time presidential runner-up Andrés Manuel López Obrador, trailed not far behind in third.

However, all three camps claimed victory in Veracruz.

Turf wars between gangs, mounting debts and allegations of corruption have turned Veracruz into a liability for Peña Nieto, but splits in the opposition have helped the centrist PRI.

There were scattered reports of violence and fraud in the state, a common complaint in Mexican elections, where party campaigners often go door to door with gifts and incentives to entice poorer voters in particular to back their candidates.

A government agency charged with investigating electoral crimes said it had received hundreds of complaints by phone and email. The opposition campaigns in Veracruz both accused the PRI of trying to intimidate their supporters and rig the vote.

Former Mexican President Felipe Calderón of the center-right opposition National Action Party, or PAN, said on Twitter two party members were kidnapped ahead of the election in Chihuahua, a state on the U.S. border that has suffered years of violence.

Reuters could not independently verify the details.

The party also said one of its mayors in Acajete, Veracruz, had his home attacked. Local media showed the building on fire.

"We're seeing a climate of persecution against the opposition in Veracruz," PAN spokesman Fernando Rodriguez said. "Veracruz has a very authoritarian, very violent, very repressive governor and today ... they're still showing that."

Accused by critics of presiding over rampant impunity and misuse of public funds, Veracruz Gov. Javier Duarte has become such a lightning rod for anger that PRI candidate Héctor Yunes has said he was "embarrassed" to be in the same party.

Duarte, who cannot seek re-election, has denied wrongdoing.

Since Duarte took office, Veracruz's debt has more than doubled to 46 billion pesos ($2.5 billion) according to official data, although other estimates put the figure far higher.

The state has also become notorious for violent crime and the killings of journalists.

Pedro Rivera, a 49-year-old entrepreneur in Xalapa backing the PAN, said many of his friends had been robbed or kidnapped and that graft was worse than ever.

"There's always been a lot of corruption, but this time's it's been really bad," he said.