WHEN Andrés Manuel López Obrador winds up a stump speech in the main square of Jilotepec, a small town in the eastern state of Veracruz, the crowd surges forward. It takes him 15 minutes to pass through the commotion of backslapping, selfies and jabbing microphones to reach the car parked outside the tent where he spoke. The point of the rally is to promote Mr López Obrador’s party, Morena, in municipal elections to be held in Veracruz in June. But his main goal is much bigger: to win Mexico’s presidency on his third attempt, in 2018.

That is a prospect that thrills some Mexicans and terrifies others. A figure of national consequence for more than 20 years, AMLO, as he is often called, has fulminated against privilege, corruption and the political establishment. Sweep away all that, he tells poor Mexicans, and their lives will improve. Many others hear in that message the menace of a charismatic populist who would punish enterprise, weaken institutions and roll back reforms. The biggest worriers view him as a Mexican version of the late Hugo Chávez, an autocrat who wrecked Venezuela’s economy and undermined its democracy.

But Mexico, like some richer countries, may now want more drastic politics. Voters are enraged by corruption, crime, which is rising again after a drop, and feeble economic growth. Not long after Mr López Obrador spoke in Jilotepec, the state prosecutor in Veracruz reported that 250 skulls, belonging to victims of drug gangs, had been found in pits near the state capital. Many Mexicans have stopped believing that either of the parties that have governed Mexico this century, the Institutional Revolutionary Party (PRI) of President Enrique Peña Nieto or the opposition National Action Party (PAN), will do much about such horrors. And now they face a confrontation with an American president who wants to end free trade, deport millions of Mexicans, build a wall and force Mexico to pay for it.

AMLO proposes to answer graft with his own incorruptibility, and Donald Trump’s nationalism with a fiery nationalism of his own. In Jilotepec he rails against the former governor of Veracruz, now facing corruption charges and on the run from the police. He slams the PRI, the fugitive’s party, as “corrupt and cynical” and the PAN as “corrupt and hypocritical”. The message strikes home. “Mexico is rich, but those who govern us rob us,” says a supporter.

Mr López Obrador has taken his campaign to the United States, where he presents himself as the only politician who can stand up to Mr Trump. In New York on March 13th he denounced Mr Peña for allowing his American counterpart to rain “insolence and insults” upon millions of Mexicans living in the United States. A President López Obrador would mean “alpha males either side of the border”, says Juan Pardinas of IMCO, a think-tank. Voters may like that idea.

Mr López Obrador is the early front-runner for next year’s election (Mr Peña cannot run again). In a one-round election, he could win with as little as 30% of the vote (see chart). If that happens, Mexico will embark on a perilous political experiment.

He began his political career in the southern state of Tabasco as an operative of the PRI, which monopolised political power at the national level from 1929 to 2000. His renegade streak showed up early. As an official of the National Indigenous Institute he spent five years living with the Chontal, an Indian community. Hence his preoccupation with the poorest Mexicans, says Lorenzo Meyer, a historian. Mr López Obrador became the PRI’s state chief, but was squeezed out of the job by priistas suspicious of his grassroots organising. His rise to national prominence came after he lost a race to be governor of Tabasco in 1994 as the candidate of what is now the Party of the Democratic Revolution (PRD), a left-wing group that had broken away from the PRI. At a sit-in in the Zócalo, Mexico City’s main square, Mr López Obrador theatrically presented 14 boxes of documents proving, he said, that the PRI had stolen the election. His talent for political showmanship helped make him mayor of Mexico City from 2000 to 2005. He ran twice for the presidency, in 2006 and 2012, losing to Mr Peña in the second contest. In 2014 he split from the PRD over its support for Mr Peña’s economic reforms and founded Morena, the Movement of National Regeneration. Mr López Obrador has been an unremitting opponent of measures to modernise the economy, from the North American Free Trade Agreement with the United States and Canada, which took effect in 1994, to the opening up of the energy market to private investors under Mr Peña in 2014. If elected, Mr López Obrador promises to hold a referendum on energy reform. A chapter in his most recent book is called “privatisation is a synonym for robbery”. He has sided with a radical and disruptive teachers’ union in resisting an education reform promoted by Mr Peña, which would require teachers in the abysmal state schools to take evaluation tests.

As Mexico City’s mayor, Mr López Obrador caused less mayhem than his image suggested he might. He built roads and introduced a small universal pension. Debt rose by a modest 9% in real terms during his mayoralty. “He got on well with businesses and with developers,” says Agustín Barrios Gómez of the Mexican Council on Foreign Relations, who is a former PRD congressman. He left office with an approval rating of 84%. But he preferred popular policies to good ones. The pensions did not require future beneficiaries to contribute. The investment in roads would have been better spent on public transport. He did not work to professionalise the police or the judiciary. In short, “he was not an institution builder”, says Mr Pardinas.

That failure points to his most worrying trait: a contempt for norms, separation of powers and the rule of law. After he lost the election in 2006, his supporters threatened a revolution and blocked Reforma, one of the capital’s main roads, for six weeks. In 2001 he responded feebly to the lynching of a man suspected of stealing religious images near Mexico City, saying, “We do not interfere with the beliefs of the people.” Though personally honest, Mr López Obrador lacks the respect for institutions that would make him an effective corruption-fighter.

As the date for the 63-year-old’s third (and probably final) run for the presidency approaches, he is trying to be less divisive. He endorsed Mr Peña’s plan to visit Mr Trump in January. (The trip was cancelled after the American president posted an insulting tweet.) He has been friendlier to business. Disappointed by the performance of the economy under the reformist Mr Peña, some entrepreneurs are “more willing to give Mr López Obrador a chance”, says Gerardo Esquivel, an economist at the Colegio de México, a university.

For now, Mr López Obrador has the political field to himself. Morena is basically a one-man party, which means its quota of party-propaganda broadcasts can focus on promoting him. Other parties have to divide their resources among various politicians; none has yet selected its presidential candidate for 2018. This “has had an enormous effect” on AMLO’s chances of winning, says Mr Aguilar.

The PRI’s nominee for president, whoever it is, will be tainted by association with the current government. The likeliest PAN candidate, Margarita Zavala, is popular, but she is the wife of a former president, Felipe Calderón, who is widely blamed for an upsurge of violence provoked by his inept crackdown on crime. The PRD has little support. Inflamed relations with the United States and an economy weakened by the onslaught from the Trump administration would also play into Mr López Obrador’s hands.

His victory is no sure thing. His momentum would be slowed if Morena does badly in the governor’s election in the State of Mexico in June. Anybody-but-AMLO voters could unite behind one candidate; nearly half of voters have a negative view of him, a much higher share than for any other potential candidate. He has a talent for self-destruction. In 2006 his 16-point lead vanished after he refused to participate in the first televised debate and called the president, Vicente Fox, chachalaca, a bird noted for its loud cackle.

Much of Mexico’s elite prays that such buffoonery will again prove his undoing. But he has become smoother and more disciplined. The danger is that, even if he is shrewder about obtaining power, he may be no wiser about how to exercise it.