Mexicans began voting for a new president on Sunday with the opposition party that dominated the country for most of the past century poised for a comeback after the ruling conservatives failed to provide strong growth or halt a brutal drugs war.
Twelve years after the Institutional Revolutionary Party (PRI) lost power, polls show its candidate, Enrique Pena Nieto, heading into the vote with a double-digit lead over his opponents, despite lingering doubts about the party.
Tainted by corruption, electoral fraud and occasional bouts of brutal authoritarianism during its 71 years in power, the PRI was voted out in 2000. But it has bounced back, helped by the economic malaise and a tide of lawlessness that have plagued Mexico under the conservative National Action Party, or PAN.
Election officials solemnly looked on as a giant red, white and green national flag was hoisted in the capital before polls opened at 8 a.m. (9 a.m. EDT/1300 GMT). The first national exit polls are expected when voting ends in the westernmost part of the country 12 hours later.
Miguel Angel Islas, 57, a salesman heading to vote in Mexico City's Condesa district, said the ruling conservatives had failed to keep the country safe or guarantee economic progress.
"The country is really worn out, emotionally and economically," he said. "We need the PRI back in power, these guys don't know how to run the country."
After ending the PRI's rule in 2000, the PAN raised hopes of a new dawn for democracy in Mexico. But years of weak growth and the death of more than 55,000 people in drug-related killings since 2007 have eroded its popularity.
Pena Nieto, a youthful-looking former governor of the State of Mexico, stepped into the breach, establishing himself as the new face of the PRI with the aid of favorable media coverage led by Mexico's most powerful broadcaster, Televisa.
He insists the PRI is now a modern democratic party. While some Mexicans are not convinced, Pena Nieto has persuaded many that his party has learned from its mistakes.
"The PRI has changed," said Gloria Velazquez, a 35-year-old street vendor in Mexico City. "And it's learned that it needs to leave more money for the people."
Bidding to become the country's first woman president, PAN candidate Josefina Vazquez Mota lies third in the polls, and Pena Nieto's closest challenger, former Mexico City Mayor Andres Manuel Lopez Obrador, is also burdened by his past.
The front-runner for much of the 2006 race, Lopez Obrador ultimately lost by half a point to President Felipe Calderon of PAN and refused to accept defeat.
Claiming fraud, he led massive protests in the capital for weeks, bringing much of Mexico City to a standstill and alienating even some of his supporters.
Though his bid in this campaign surged late on when a wave student-led opposition to the PRI boosted his ratings, polls suggest Lopez Obrador will fall some way short of the 35 percent of votes he won in 2006.
Lopez Obrador has in recent weeks sounded alarms about possible vote fraud, raising concerns he might call new street protests if he loses again.
His belligerence after 2006 exposed tensions within the main leftist grouping, the Party of the Democratic Revolution (PRD), although it has rallied behind him again for this campaign.
Though it has effective and popular control in Mexico City, the PRD's record outside the capital has been tainted by allegations of corruption and incompetence.
Vazquez Mota's hopes have suffered from her association with Calderon's military-led offensive against drug cartels, which fanned the violence instead of reducing it.
Pena Nieto has seized on Calderon's failure, arguing the PRI's experience in power means it best understands how to restore peace to Mexico and reinvigorate the economy.
Final polls showed Pena Nieto winning 40-45 percent of the vote, Lopez Obrador close to 30 percent with Vazquez Mota not far behind. Gabriel Quadri, a fourth candidate competing for a smaller party, is expected to pick up a few percent. The one with the most votes wins, with no need for a second round.
The PAN's Vicente Fox defeated the PRI in 2000, served for six years and was followed by Calderon. Presidents can only serve a single term in Latin America's second biggest economy.
The PRI laid the foundations of the modern state with a nimble blend of politics and patronage that allowed it to appeal to labor unions and captains of industry at the same time.
The party that nationalized the oil industry in 1938 also made sweeping free-market reforms in the 1990s and signed the North American Free Trade Agreement (NAFTA) with the United States and Canada, upholding a populist image while a small cadre of well-connected capitalists grew rich through effective oligopolies.
Mexicans eventually tired of the one-party rule that stifled dissent, rewarded loyalists and allowed widespread corruption.
The era of old-time PRI bosses known as "dinosaurs" gave way to a more democratic era under the 1994-2000 presidency of Ernesto Zedillo, who instituted reforms that allowed opposition parties to compete in a fair vote and oust the PRI.
On Sunday voters will also decide on six state governors and both houses of congress, with gains expected for the PRI.
The legislative results will help determine whether Pena Nieto will be able to push through his plans to liberalize antiquated labor laws, improve the tax take and open up state oil giant Pemex to more private investment.
Financial investors are encouraged by Pena Nieto's reform agenda, which would be more friendly toward foreigners, and hold out hope he would promote well-educated technocrats like those who oversaw the economy during the PRI's later years in power.
However, its opponents remain fierce.
"The PRI means returning to the same: crime, drug-trafficking, corruption," said Jose Rojas, an unemployed 62-year-old. "It has always repressed Mexico."