Mexicans vote Sunday in a potentially transformative election that could put in power a firebrand vowing to end politics and business as usual in a country weary of spiraling violence, unchecked corruption and scandal-plagued politicians.
Former Mexico City mayor Andres Manuel Lopez Obrador has led opinion polls throughout the campaign and would be the first leftist to take the presidency in decades in Mexico if he ousts the ruling centrist Institutional Revolutionary Party (PRI).
But his rivals warn that a victory by leftist Andres Manuel Lopez Obrador could set the country back decades with an interventionist economic policy and are also promising to fight corruption and bring change to Mexico. All the candidates are lambasting President Donald Trump's policies against migrants and Mexico.
The voting Sunday was by and large peaceful, apart from the usual complaints about some volunteer-staffed polling places opening late.
The head of the country's electoral institute, Lorenzo Cordova, said voting was proceeding "peacefully, without major incidents," and that only four of the 156,807 polling places failed to open.
Sunday's elections for posts at every level of government are Mexico's largest ever and have become a referendum on corruption, graft and other tricks used to divert taxpayer money to officials' pockets and empty those of the country's poor.
This is Lopez Obrador's third bid for the presidency after emerging as the runner up in in the 2012 and 2006 elections, and some see it as his best shot after 12 years of near-permanent campaigning. Lopez Obrador pitches himself as the only man capable of cleaning up a political class whose credibility has been ground down by persistent graft, soaring crime levels and years of sub-par economic growth. His railing against the "mafia of power" that has long ruled Mexico and in favor of the poor appears to be falling on receptive ears with polls showing him with a wide lead over three rivals who have failed to ignite voters' interest.
"The corrupt regime is coming to its end," Lopez Obrador, a 64-year-old commonly known as AMLO, said at his final campaign event Wednesday in a soccer stadium in the capital Mexico City. "We represent modernity forged from below."
"The new president of Mexico will have moral and political authority to demand everyone behaves with integrity and make honesty a priority as a way of life."
The law bars current President Enrique Pena Nieto from seeking re-election. But his popularity crumbled as his name became tainted by investigations into alleged conflicts-of-interest and embezzlement scandals engulfing top PRI officials. Its candidate, former finance minister Jose Antonio Meade, failed to gain traction with voters who would not give him the benefit of the doubt in spite of his ample resume in government and being an outsider to the ruling party.
Ricardo Anaya, an ex-leader of the center-right National Action Party (PAN) is the candidate of a right-left coalition. He has tried to harness the youth vote with an emphasis on technology and new ideas, but he divided his own conservative party to take its candidacy and it's unclear if his new allies in the leftist Democratic Revolution Party will actually turn out for someone from the other end of the ideological spectrum.
Sunday is the first time that an independent candidate appears on the ballot.
Jaime "El Bronco" Rodriguez fought for attention with a horse-mounted "everyman" campaign and by tossing out policy bombs like his proposal to cut off the hands of public officials caught stealing. Without the big party machinery it was an uphill battle.
But "independent candidacies are here to stay in Mexico," Janine Otalora Malassis, president of the electoral court, said on Friday.
It is also the first time Mexicans living abroad can vote for down ballot races like senators. More than 181,000 received ballots and the 97,000 that the National Electoral Institute had gotten back by Friday morning were already double what they got in 2012.
Juan Carlos Enriquez, 30, said he supports Lopez Obrador but warned him that he better not steal.
"Of course, I want him to win. But it has to be made clear that he has to deliver what he promises and not become like the rest," he said.
Lopez Obrador has watched political careers rise and fall as established parties were consumed by the country's social and economic problems and the responsibility of power.
"Let's hope Mexico changes," said Oswaldo Angeles, 20, a Lopez Obrador supporter from Atlacomulco, a longstanding PRI bastion some 55 miles (90 km) from Mexico City and hometown of Pena Nieto. "Right now, we don't know if we're coming or going."
Hovering over the election is the specter of vote fraud, though electoral officials deny it is a possibility with the modern balloting technology and institutions now in place.
In both of Lopez Obrador's previous two presidential losses he alleged fraud. In his first loss — by a mere 0.56 percent to conservative Felipe Calderon in 2006 — his supporters held months-long protests in Mexico City and he referred to himself as "the legitimate president."
His allies are warning even before Sunday's presidential vote that there better not be any funny business.
"They shouldn't dare commit a fraud, because if they do they will meet the devil," said Yeidckol Polevnsky, president of Lopez Obrador's Morena party. "We will not accept it."
His commanding poll lead this time around has led analysts to question how deep-rooted the support really is.
"There's a sense of poor old (Lopez Obrador), he's not had a go yet, it's his turn. We may as well give it a shot," said Sofia Lara, 25, a graphic designer in Mexico City backing Anaya.
Lopez Obrador has been vague on policy details. Seeking to harness support from economic nationalists, leftist liberals and social conservatives, he vows to reduce inequality, improve pay and welfare spending, as well as run a tight budget.
A vocal opponent of the government's economic agenda, his criticism has been tempered by business-friendly aides.
But he has played with the idea of referendums to resolve divisive issues like whether to continue with Pena Nieto's opening of the oil and gas industry to private capital.
His rivals Anaya and Meade differ only in nuance in their support of the energy reform.
Their efforts to catch Lopez Obrador have been hampered by attacks on each other, allowing him to build a lead that some opinion polls have put in excess of 20 percentage points. They also represent the only two parties to have ruled modern Mexico.
If victorious, Lopez Obrador faces a tougher security situation than did Pena Nieto. The election campaign has been the bloodiest in recent history and murders are at record highs.
The next president will also inherit a simmering dispute with U.S. counterpart Donald Trump over migration and trade, with talks to rework the North American Free Trade Agreement (NAFTA) unresolved, pressuring Mexico's peso currency.
Trump has threatened to pitch North America into a costly trade war over NAFTA, and his insistence that Mexico pay for his planned border wall has deeply angered many Mexicans.
Lopez Obrador has trodden carefully and wants to broker a deal with Trump under which Mexico would work to rein in illegal immigration in return for economic support.
If that proves impossible and Trump keeps provoking Mexico, few think the fiercely patriotic Lopez Obrador will stay silent.
How much heft Lopez Obrador can bring to bear both domestically and internationally will depend significantly on his control of Congress, where no party has held an outright majority since 1997 in Latin America's no. 2 economy.
Polls suggest his National Regeneration Movement (MORENA), a party that has only existed formally since 2014, could be close to reaching a majority. However, markets may react negatively if voters give him too free a hand in Congress.
Mexico's next leader will serve a six-year term ending in late 2024, and will be constitutionally barred from seeking re-election at the end of his six-year term.
Candidates win with a plurality of the votes and there is no runoff.
Only two parties have occupied the presidency in modern Mexican history: The PRI, from 1929 to 2000 and again since 2012 under current President Enrique Pena Nieto; and the PAN, from 2000 to 2012.
The next president will take office on Dec. 1, five months after the election.
Mexicans will also be voting for an all-new Congress — 128 seats in the Senate and 500 in the Chamber of Deputies — as well as state legislatures, eight governorships, the head of government for Mexico City and nearly 1,600 mayors across the nation. In all, there are some 17,670 names on ballots at the federal, state and local level.
Polls open at 8 a.m. and remain open until 6 p.m. in each of Mexico's three summer time zones, with the last to close coming in the northwestern state of Baja California.
Nearly 90 million Mexicans are registered to vote, something that comes automatically when citizens receive their government ID cards at age 18.
In the last presidential election, in 2012, a little over 50 million people cast ballots for a turnout of about 63 percent.
Mexico is home to some 120 million people, the third most populous nation in the Western Hemisphere after the United States and Brazil, and it covers more than 750,000 square miles (1.9 million square kilometers) of terrain, about one-fifth the size of the United States.
Mexico had a gross domestic product of about $1.2 trillion last year, making it the world's 15th largest economy, according to International Monetary Fund figures. Leading industries include petroleum, tourism, agriculture and manufacturing, and remittances from migrants living abroad also pump billions of dollars into the economy each year.
The United States is by far Mexico's biggest trade partner, with the two doing more than $600 billion in two-way trade each year.
About half the country's people live below the poverty line.