Until last year, the North American Free Trade Agreement (NAFTA) had enjoyed a relatively untroubled existence. For its nearly 24 years, the agreement, which links the economies of the United States, Canada, and Mexico by removing trade tariffs between them, sat largely beyond the public consciousness. But those quiet days are no more. On October 17, the fourth round of talks to renegotiate NAFTA, spurred on by President Donald Trump’s insistence that it is to blame for lost jobs in America, came to an end. Mexico’s leaders had hoped to finish the talks quickly, but Trump’s demand to balance trade deficits has pushed out the talks. At the end of last month, negotiations were extended to 2018.

This is bad news for the government of Mexico’s President Enrique Peña Nieto, which hoped to finish talks before the new year to reassure investors and dispel the uncertainty swirling around the trade deal that has sent the peso flailing up and down. Mexico’s political elites also hoped that by wrapping up discussions, NAFTA would remain beyond the grasp of Andrés Manuel López Obrador, the left-wing populist running for president in next year’s elections. A 63-year old former mayor of Mexico City and three-time presidential candidate, López Obrador has called NAFTA a bad deal for Mexico, and has demanded that re-negotiations be delayed until after the upcoming election. Peña Nieto, he has said, is “a weak leader who could sell out Mexico to the U.S.” López Obrador is a nationalist, and restructuring NAFTA is just one his many policy proposals that could take the Mexico-U.S. relationship on a much different route. So far, his pitch is working: many early polls put López Obrador in the lead.

In a September speech at the Wilson Center’s Mexico Institute in Washington, D.C., López Obrador clarified exactly what he believes ails his country. “There is nothing that has done more damage to Mexico than dishonesty,” he said in an uncharacteristically temperate tone. Violence, social inequality, impunity—nearly every evil in the country—could all be blamed on corruption. By ending graft, he said, he would fund massive infrastructure projects and revive Mexico’s agricultural sector. Under his presidency, fathers would no longer leave their families for work in America. Young men would resist the pull of gangs and cartels, ending the drug war. This, he said, would lead to nothing short of “Mexico’s rebirth.” He could accomplish all this, he asserted, by “governing by example …  Corruption has its origin at the top of the pyramid of power, and the top of society, and it trickles down.”

This is the essence of López Obrador’s appeal: a radical belief in himself, what some have taken to calling a “messiah complex.” But it is also this promise—that all will be all right once he is in power—that critics call his tragic flaw.

While López Obrador has been preaching some version of his populism for decades, his message has never been more timely. Mexico’s ruling Institutional Revolutionary Party (PRI) has been tarnished by several corruption scandals under the deeply unpopular Peña Nieto, and it has led to a energetic anti-establishment movement. López Obrador has so rattled the PRI that, in August, it altered internal rules to allow outsiders to run for its presidential nomination. Mexico’s two other main parties, the leftist Party of the Democratic Revolution (PRD) and the conservative National Action Party (PAN), have followed suit, announcing the need for a broad alliance, one that is expected to draw votes from the party López Obrador founded in 2014, the National Regeneration Movement (MORENA).

López Obrador owes his popularity, in large part, to the failures of Mexico’s past three presidents. PRI had ruled Mexico for 70 years, but after two decades of economic turmoil, in 2000, it gave way to PAN’s Vicente Fox and later to Felipe Calderón, to whom López Obrador barely lost in 2006. A profound sense of hope —both for democratic renewal and economic resurgence—accompanied the PAN’s rise. But the party failed to deliver, and under Calderón, Mexico descended into a bloody drug war whose victims were predominantly the country’s poorest.

In 2012, Mexico elected Peña Nieto, putting the PRI back in power, but his administration has stumbled from one disaster to the next. There was the sloppy investigation and possible cover-up of the massacre of 43 students in the southern state of Guerrero in 2014. There was also a scandal involving his family’s home, which was built by a company favored for government contracts and sold to the family for a steal. Then, earlier this year, Mexicans learned their government may have used Israeli-built spyware to hack the phones of activists, journalists, even members of an international panel investigating the missing 43 students. The malaise of Peña Nieto’s term, preceded by PAN’s failures, has left the country feeling it had no political alternative. Except, of course, for the man who has always branded himself as the alternative.

López Obrador got his start in politics with the PRI in the late 1970s, working for the poet-turned-senator Carlos Pellicer Cámara. When Cámara died only a year into his term, López Obrador left politics for a government post helping the indigenous Chontal Maya people in his home state of Tabasco. Lorenzo Meyer, a political analyst and professor at El Colegio de México, told me this was a formative time for López Obrador. Indigenous groups like the Chontal Maya are among Mexico’s poorest, most ill-treated and overlooked people, and López Obrador chose to live beside them in a village without running water or electricity. It was here that he grew to resent the PRI, which controlled every state governorship and both houses of congress. López Obrador has always respected revolutionaries (he named one of his sons after Ernesto “Che” Guevara), and after his time with the Chontal Maya he emerged as a harsh critic of the PRI. “He knew the PRI from the inside,” Meyer said, “and he began to organize the militants within the PRI to put pressure on the upper levels of the pyramid.”

In the late 1980s, López Obrador and a group of leftists split from the PRI to form the PRD. He quickly became its star organizer, forming volunteer “Sun Brigades” who walked door to door to tell people that ousting the PRI and ending corruption would help them more than the temporary handouts PRI gave before elections to sway voters. In 1992, he led a 600-mile march from Tabasco to Mexico City to protest against what he alleged was a massive, PRI-orchestrated vote-rigging scheme.

With this momentum, López Obrador ran successfully for mayor of Mexico City in 2000. As mayor, he cultivated a reputation for stability, adding a level to a heavily trafficked freeway to ease gridlock, extending badly needed pensions to the elderly and single mothers, and authorizing a flurry of development. He delivered on many of the social reforms he’d promised, but found less success with the other major tenet of his campaign: ending corruption.

When López Obrador first came to office in search of fresh ideas, his staff turned to legal and economic analyst Edgardo Buscaglia, who suggested the creation of public audit boards. Buscaglia, now a senior research scholar at Columbia University, said he told López Obrador’s team that, by giving citizens a chance to review government spending, they could deter corruption and renew confidence in the local government.

But when López Obrador’s team returned to Buscaglia with a response from their boss, he said he was told the boards would give “people too much control,” and that the mayor could do a better job of deterring corruption on his own. It seemed counterintuitive to the image López Obrador had developed as the people’s champion, but Buscaglia argued this is because López Obrador is not the revolutionary devoted to democratic reforms that he claims to be. In Buscaglia’s mind, López Obrador left Mexico City’s corrupt hierarchy intact so that he could wield it to his own end.

This is why this theory of cleansing corruption through governing by example seems suspect. Just in the time López Obrador served as mayor, two of his close advisors were later accused of taking bribes. And without lasting reform, the corrupt system in Mexico City remained for the next mayor.

“So for me,” Buscaglia said of López Obrador and MORENA “they are no revolutionaries. I wish they were.” While for him—a comfortable, economically secure person—MORENA does not represent change, he acknowledged that if he were a desperate man who is being threatened by organized crime on a daily basis, my daughter was kidnapped, I can barely afford to live—I would vote for López Obrador.”

Despite López Obrador’s failure to end corruption in Mexico City, thanks to his pragmatic agenda, he left the mayor’s office in 2005 with an 84 percent approval rating, success he  parlayed into a near-win for president in 2006. Upon losing, he immediately condemned the vote as rigged, calling upon supporters to blockade downtown Mexico City for six weeks. His defiance only made the unsavory comparisons to Hugo Chavez that had plagued him during the campaign more real. Already he was a left-leaning  populist who claimed to stick up for the poor against a corrupt elite ruling class, but now he also refused to accept a democratic vote. It proved too much for moderates and Mexico’s business class.

Controversially, López Obrador also opposed globalization. While political elites on both sides of the border hailed NAFTA as Mexico’s savior, López Obrador cautioned, with good reason, that it would devastate the country’s rural farmers, like those he’d worked with in Tabasco. While the deal helped create a super-class of billionaires (Mexico has the second-most of any Latin American country), it has done little for Mexico’s poorest. Half the country still lives in poverty. His anti-free trade image was one he couldn’t shake when he ran for president again in 2012, losing to Peña Nieto by seven points.

Since then, López Obrador has learned a few lessons. He has tried to appear less the revolutionary agitator and more the candidate with answers. (He does, however, still refer to the country’s mainstream parties as “mafias of power.”) For the drug war, he counsels abrazos no balazos, “hugs not bullets.” He will push the country to grow its own food. He promises to renegotiate NAFTA along with Mexico’s oil contracts to get the best deal for the Mexican people. And, as he pledges everywhere he goes, he will end corruption.

That may be an impossibly tall order: Today, Mexicans see corruption virtually everywhere, and, while there is widespread acknowledgement that the current system is broken, critics call López Obrador’s prescriptions overly idealistic and simple, and say they would destabilize the economy and weaken democracy. But such is the level of despair in Mexico that MORENA’s greatest attribute may be that it hasn’t yet had the chance to fail. Mexicans are losing faith in their leaders, Buscaglia said. And that, he added, has opened the country “to any kind of charlatan who comes with any kind of populist discourse and promises the sun and the moon.”

At a moment of profound distrust in the government, López Obrador’s vision may be an intoxicating one, but if history is any guide, it is unlikely to provide the reality he promises.