By Frank Jack Daniel
MEXICO CITY (Reuters) - Mexico's ruling Institutional Revolutionary Party (PRI) limped to victory in a key state election on Sunday, according to an official preliminary projection of results that was quickly challenged by the leftist party seen beaten into second place.
The putative win was a close call for President Enrique Pena Nieto's PRI, which has governed the electoral region -- the State of Mexico -- for nearly nine decades. It will not end the aspirations of leftists led by Andres Manuel Lopez Obrador, an early favorite for next year's presidential race.
Despite its apparent victory against a party that was only founded three years ago, the PRI still has to battle widespread anger at corruption and rising violent crime under Pena Nieto as the countdown starts for the July 2018 presidential election.
However, the peso reversed earlier losses and gained 0.59 percent on the setback for Lopez Obrador, a sign of ongoing market distrust of the leader who has opposed economic liberalization in Mexico.
With 70 percent of returns in from polling booths, PRI candidate Alfredo del Mazo had 32.4 percent of the vote compared to 31.6 percent for Delifna Gomez, the candidate of Lopez Obrador's National Regeneration Movement (MORENA).
But an early count projection from the state's electoral institute said del Mazo's lead would widen to between 32.75 percent and 33.59 percent of the vote. Gomez was seen taking no more than 31.53 percent.
Lopez Obrador called the rapid count "a farce" and said he did not accept it, while Gomez insisted she had won the election.
Lopez Obrador has alleged fraud in past elections, and he vowed to scrutinize the results from every voting booth.
"We will never resort to violence, but we are going to firmly defend this country's democracy," he said in a video message.
Prosecutors are investigating piles of pig heads left on Saturday in several municipalities in the state as well as telephone threats and fake electoral literature warning of attacks -- tactics used to dissuade people from voting.
Including many populous neighborhoods on the edge of Mexico City, the State of Mexico is home to one in eight Mexican voters and it has long been a source of strength and financing for the PRI.
However, del Mazo is projected to have won with barely half the share of votes that the current governor won six years ago with the backing of Pena Nieto, himself a former governor of the state whose own popularity has since plunged.
Failing to put a stop to corruption scandals and struggling to tame brutal gang violence has cost the party dearly.
Mexico's attorney general's office said on Sunday a former state governor for the PRI had been arrested at Mexico's request in Panama on corruption charges. The former governor -- Roberto Borge -- has previously denied wrongdoing.
In another election on Sunday, the PRI lost in Nayarit state, after a senior security official from there was arrested in the United States on drugs charge in March.
It was also struggling to keep hold of the northern state of Coahuila. One of the PRI's recent governors in the border state is wanted on corruption charges in the United States.
The PRI now has six fewer governors than when Pena Nieto took office. Going into Sunday, the PRI and its allies controlled 16 states, or half the regional governments.
Lopez Obrador's State of Mexico campaign was hurt by the failure to ally with others in the opposition and references by rivals to crisis-hit Venezuela, which the PRI argues mirrors his economic model, an accusation he denies.
He has opposed the opening of Mexico's energy sector to private capital, a key reform under Pena Nieto, but no longer vows to reverse it.
Linking Lopez Obrador to former Venezuelan President Hugo Chavez has helped rivals beat him to the top job in two previous bids at the presidency.
Victory for Lopez Obrador in 2018 could push Mexico in a more nationalist direction at a time of tension with the United States, with U.S. President Donald Trump riling Mexicans with threats to tear up the North American Free Trade Agreement and build a border wall.
(Additional reporting by Anthony Esposito, Dave Graham, Anahi Rama and David Alire Garcia; Editing by Jeremy Gaunt)