WHEN Latin America zigs, Mexico seems to zag. In the mid-2000s a political “pink tide” swept left-of-centre leaders into power across the region, while Mexico elected two conservative presidents. Now that tide has ebbed, as Brazil, Argentina, Peru and others have swung to the right. But Mexico may again prove an exception. The front-runner in its presidential contest in 2018 is Andrés Manuel López Obrador, a left-wing populist.

He is no policy wonk, and prefers fiery speeches to ten-point plans. As mayor of Mexico City from 2000 to 2005, he focused on motorways and local pensions. Even so, it is hard to predict how he might govern as president. He lists three former presidents—Benito Juárez, Francisco Madero and Lázaro Cárdenas—as his heroes. Of these, Cárdenas, Mexico’s foremost leftist, appears uppermost in his mind.

Tata (“Papa”) Lázaro is remembered above all for two achievements. In 1938 he seized British- and American-owned oilfields, and nationalised the industry. He also enacted large-scale land reform, breaking up big estates into ejidos, or peasant collectives. These policies have proved durable. The state still controls almost all of Mexico’s oil, and ejidos remain throughout the countryside.

Both issues sit near the top of Mr López Obrador’s agenda. He denounces recent reforms to open the energy industry to private firms as the work of traitors, and has called for a referendum on fully returning the oil sector to the state. In his book, “2018: The Way Out”, he lauds the price floors Cárdenas set for basic crops, which he hopes to reinstate in order to make Mexico self-sufficient in agriculture.

Yet Mr López Obrador seems to misunderstand how his idol left such a lasting legacy. Cárdenas had a keen sense of what his son, Cuauhtémoc, has called “the distinction between the popular and the populist”. Tata Lázaro sought to reduce social division, not augment it. He seldom incited hatred against rivals, and pardoned 10,000 people who had risen up against the state. Mr López Obrador, in contrast, is less fond of unifying gestures. As mayor, he mocked anti-kidnapping protesters as pirrurris (“rich kids”).

Cárdenas was also a proud institution-builder. When he took office, his party was little more than a clique of generals from the Mexican Revolution. He transformed it into a movement with 4.3m members, which would become the Institutional Revolutionary Party (PRI) and hold power until 2000. In 1940, rather than cling to power or appoint a radical ally, the Marx-reading president picked a moderate successor. That set the stage for decades of political stability and economic growth, and entrenched the principle of a single presidential term with no re-election that Mexico still abides by. The PRI was certainly corporatist and undemocratic. But as a system stronger than the people who ran it, it was unique in Latin America—at least until it unravelled into corrupt incompetence.

Mr López Obrador could not be more different. He has undermined Mexico’s democratic institutions. After a narrow defeat in the presidential election of 2006, he refused to concede, claiming without evidence that the result was fraudulent. He declared himself the “legitimate president” and led protests for weeks.

He also has little use for political parties. After twice running as the presidential candidate of the Party of the Democratic Revolution, which was founded by Cuauhtémoc Cárdenas, he ditched it in 2012 to form Morena, a new left-wing party, purely as a vehicle for his candidacy. He is unlikely to enjoy a legislative majority if elected, and his confrontational manner will make it difficult for him to find allies for his policies.

Abroad, Mr López Obrador pledges to act “like the older brother in Latin America”, not the obedient younger brother of the United States. However, Cárdenas based his oil expropriation on cool calculation as well as nationalist zeal. He correctly anticipated that Franklin Roosevelt would be wary of driving Mexico towards Germany, ensuring that any retaliation would be limited. If elected, Mr López Obrador will face a much tetchier antagonist. In February he described Donald Trump as an “irresponsible neo-fascist”, a slight the thin-skinned American president is unlikely to forget.

If efforts to revise the North American Free-Trade Agreement somehow satisfy Mr Trump, Mr López Obrador still vows to revisit any deal he finds “unfair”. And not all Mexican presidents have enjoyed Cárdenas’s good luck in tussles with Uncle Sam. A border dispute manufactured by the Americans in 1846 ended with Mexico losing half of its territory. The longer view shows that picking fights with the United States carries risks as well as rewards.