ECATEPEC, Mexico -- Voters in Mexico's most populous state cast ballots Sunday that could hand the ruling party a much-needed boost ahead of next year's presidential elections or a potentially devastating blow by throwing off its uninterrupted 88-year local rule.

Voting centres closed in the evening amid dueling accusations of vote buying, complaints that some voters received intimidating telephone calls warning them not to cast ballots and reports of bloody pig heads being left outside opposition party offices.

Leading candidates Alfredo del Mazo of the governing Institutional Revolutionary Party, or PRI, and Delfina Gomez of the leftist Morena party both proclaimed victory in the State of Mexico soon after voting ended and long before the official result was known, as commonly happens in the country.

Exit polls were inconclusive and showed a tight race, and early official counts showed each of the two candidates pulling about a third of the vote with just a small fraction of ballots tabulated.

Polls in the closing days of the campaign had given the PRI a slight edge, though the final result could hinge on which party mobilized its supporters and the possibility of party-switching by voters hoping to preventing a PRI victory.

"We are tired of so much corruption, corrupt politicians, corrupt police," said Ruben Sanchez Mendoza, a 47-year-old shopkeeper in the sprawling Mexico City suburb of Ecatepec who backed Gomez. "The truth is, without a change, I don't see a future for ourselves or our children."

But at a polling station nearby, 65-year-old retiree Maria Concepcion Sanchez Morales said she was voting for the PRI despite claims by Morena that the ruling party gave away "rotten beans" to buy votes.

"They say they give out rotten beans, but at least they give out beans," she said. "Let's not lie: All the benefit programs come from the PRI."

Both agreed that crime, such as widespread robberies in the street and aboard public buses, was the most pressing issue.

"They rob, they steal, at any time of the day or night," Sanchez Morales complained.

Near the polling stations, neighbours had strung a banner across a street reading: "Thief, if we catch you, we're not going to turn you over to police. We will lynch you."

The PRI, which dominated all of Mexico for most of the 20th century, has been struggling with low approval ratings under Pena Nieto, putting its hold on national power at risk in next year's presidential race.

If Gomez, a schoolteacher-turned-politician, were to pull out a win, it would boost Morena party leader Andres Manuel Lopez Obrador's chances as he prepares to make a third run for the presidency.

Jose Antonio Crespo, a political analyst at Mexico's Center for Economic Research and Teaching, said such a result would be a "huge hit" to the PRI: "It would lose one of the most important bastions in terms of image, in terms of enthusiasm among PRI-ists."

With polls suggesting about two-thirds of voters back parties other than the PRI, divisions in the opposition vote could be the ruling party's best shot at retaining power in Mexico State -- and perhaps nationally. No Mexican president has gotten more than half the vote in an election in nearly two decades.

The federal electoral prosecutor's office said it had received a sharp increase in complaints of alleged irregularities, and residents of Mexico State reported parties offering them packages of staple goods. Local newspapers published photos of money cards bearing the PRI insignia allegedly being handed out to potential voters.

An official with the state prosecutor's office confirmed it was investigating the disappearance of a local Morena leader. The official was not authorized to discuss the matter publicly and insisted on speaking anonymously.

Voters in the states of Coahuila and Nayarit were also choosing new governors Sunday.

But Mexico State is the country's biggest electoral prize, with 11 million voters and substantial industry and influence in the area around Mexico City. Control of the state can be key to a presidential campaign, giving the victorious party resources and a wealth of patronage jobs for backers.

Pena Nieto himself was its governor, as were the father and grandfather of Del Mazo, who is himself a distant cousin of the president -- a fact often trumpeted by opponents hoping to capitalize on Pena Nieto's low popularity, which is dipping near single digits nationally.

The PRI held the presidency from 1929 until 2000, and Pena Nieto recaptured the top office in 2012. While it remains the only truly national party in Mexico, PRI lost governorships last year in four states where it had never lost before. And it faced problems in Mexico State that the PRI was hard pressed to blame on anyone else.

Nearly everyone has a story about being robbed on the buses that shuttle people to and from work in the capital. The state's Mexico City suburbs -- some of them chaotic cities of 1 million or more in their own right -- are plagued by violence, especially against women. Just this week authorities in Chalco found the burned bodies of a woman and two children in a grassy lot.

"We need new people, people really committed to citizens, who really apply the law, who give justice to the missing and murdered women in Ecatepec," said Francisca Anaya, a 52-year-old unemployed project manager. "The women of Ecatepec right now are defenceless. There is no one to protect us. At any moment they can kidnap, rape, disappear us."

Associated Press writer Mark Stevenson reported from Ecatepec and AP writer Maria Verza reported in Mexico City. AP writer Christopher Sherman in Mexico City contributed to this report.