(Recasts with threats, quotes from voter)
TEXCOCO, Mexico June 4 (Reuters) - Pigs heads dumped outside polling stations and phone threats marred the final hours before an election in a major Mexican state where voters on Sunday decide whether to stick with the ruling party, in a dry run for next year's presidential contest.
President Enrique Pena Nieto's Institutional Revolutionary Party (PRI) is battling to halt a run of losses. It is squaring off in the State of Mexico, its biggest regional bastion, with the new party of leftist Andres Manuel Lopez Obrador, who leads early polls for the July 2018 presidential race.
In PRI hands since 1929, the State of Mexico is home to one in eight Mexican voters, and if it falls to Lopez Obrador's National Regeneration Movement (MORENA) it could provide him with a springboard to take the top job.
"It's a pivotal election, not just for MORENA, it's a pivotal election for Mexico," the two-time presidential runner-up said in a recent radio interview. "Imagine the message that will go out to the world (if MORENA wins)."
Victory for the combative Lopez Obrador in 2018 could push Mexico in a more nationalist direction at a time of heightened tensions with the United States. President Donald Trump has riled Mexicans with threats to tear up a joint trade deal and build a border wall to keep out undocumented immigrants.
Prosecutors are investigating piles of pigs heads left in several municipalities in the state that curves round Mexico City on Saturday, as well as telephone threats and fake electoral literature warning of attacks.
The threats were intended to dissuade people from going to vote, the special prosecutor for electoral crimes said in a statement. Mexican media showed images of the pigs heads outside MORENA offices, as well as polling stations.
Other images showed funeral wreaths allegedly placed at the homes of local electoral officials. It was not clear who was behind the threats.
Mariel Vazquez, 42, a small businessman from Texcoco, at the polling station on the outskirts of Mexico City where MORENA candidate Delfina Gomez was voting, said what he called "dirty work, tricks," meant his favored candidate might not win.
"(But) if I don't come to vote or if I vote blank, that vote goes to the PRI," Vazquez said, declining to say who he voted for. "I don't want more of the PRI."
Accusations of vote buying and intimidation are common in Mexican elections, especially at the state and local level. The tight race in the State of Mexico has made the stakes higher for the parties.
Opinion polls show MORENA's Gomez running neck-and neck with PRI rival Alfredo del Mazo in the region of 16 million people that Pena Nieto himself once governed. Del Mazo is a distant cousin of the president and the son and grandson of former state governors.
Pena Nieto's popularity helped his successor retain the state by a landslide in 2011, but his 4-1/2 years as president have battered his reputation and hurt the party.
Failing to end corruption scandals that have long tarnished the PRI, and struggling to tame brutal gang violence, the president is no longer an electoral asset, while his home state has become a symbol of all that plagues his administration.
Polls show most voters in the State of Mexico want a new government but are divided about who should form it.
The PRI also defends two other governorships on Sunday, in the states of Nayarit and Coahuila. Polls show the PRI is trailing well behind the main opposition candidate in Nayarit, and is in a tight race in Coahuila, where it could be ousted for the first time. In the violent state of Veracruz, voters choose new municipal authorities on Sunday.
Under Pena Nieto, the party's once iron hold on Mexico's states has gradually weakened, and it now has five fewer governors than when he took office. Going into Sunday, the PRI and its allies controlled 16 states, or half the regional governments.
The State of Mexico is the jewel in the PRI's fading crown, and the party is not giving it up without a fight.
Opposition accusations of PRI vote-buying are rife.
"They're doing what they did in 2011, but on a bigger scale and in greater volume," said Alejandro Encinas, a leftist opposition senator who finished second in the 2011 contest for the state.
"The penetration of money is quite something where there's so much poverty. You have whole families who sell their vote."
The PRI rejects the accusations.
Lopez Obrador's party has yet to win a state election, and the PRI this week seized on tweets by the Venezuelan embassy thanking MORENA for support to accuse him of wanting to turn Mexico into struggling Venezuela. (Reporting by Dave Graham; Additional reporting by Anahi Rama; Editing by Frank Jack Daniel and Andrea Ricci)