WHEN campaigning for Mexico’s general election officially begins on March 30th, Andrés Manuel López Obrador, a left-wing populist, will be the clear front-runner for the presidency. His two main challengers are political moderates, but their rivalry is no less bitter for that. One is backed by the government. The other is feeling heat from the federal prosecutor. To many Mexicans, that smacks of political bias. It also increases the chances that Mr López Obrador will win the presidency—a prospect that terrifies markets and puts economic reforms in jeopardy.

On February 21st the office of the acting attorney-general, Alberto Elías Beltrán, confirmed that it was investigating a property deal involving Ricardo Anaya, the brainy presidential candidate of the centre-right National Action Party (PAN). This has shaken up a campaign in which the main issues are crime and corruption.

Few voters think that José Antonio Meade, the nominee of the ruling Institutional Revolutionary Party (PRI), is the best candidate to tackle these ills. No one has accused Mr Meade, a technocratic former finance and foreign minister, of wrongdoing. But voters regard the PRI and Mexico’s current president, Enrique Peña Nieto, as abettors of lawlessness. Crime has soared. Mr Peña’s government has been dogged by allegations of graft. In February the government auditor said that 1.3bn pesos ($71m) of public money had gone missing from two ministries run by Rosario Robles, now secretary of agrarian development. Mr Peña’s personal reputation was damaged in 2014 after reports that his wife had acquired a house with help from a businessman who had contracts with the government.

Mr López Obrador, often known as AMLO, and Mr Anaya have contrasting claims to be the candidates of clean government. The leftist former mayor of Mexico City has a decades-long career of railing against corrupt elites and promises to clean up Mexico through the sheer force of his righteousness. Although presidents serve for a single six-year term, Mr López Obrador says Mexicans will get the chance to vote him out of office every two years, by referendum. Mr Anaya has a more modest suggestion for establishing the rule of law. He says he would make institutions such as the attorney-general more independent. He is the only one of the three leading candidates to emphasise this.

Landing in trouble

The property scandal surrounding Mr Anaya has the twin effect of dramatising the need for the institutional reform he champions, while making it less likely that he will be in a position to lead it.

It revolves around the purchase of land in 2014 by a firm owned by Mr Anaya and his family in his home state of Querétaro. The firm paid $815,000 for the plot, built a warehouse on it and sold it two years later for $2.5m. The investigation and the coverage of it by the press have raised questions about the probity of the people Mr Anaya’s firm dealt with, about the size of the profit it made and about the tax it paid. Mr Anaya insists he is blameless on all counts.

Mr Elías Beltrán is looking into whether the purchaser, a company thought to be linked to Manuel Barreiro, a businessman, engaged in money-laundering. A lawyer who says he represents two people hired by Mr Barreiro has stated that Mr Barreiro controlled the money for the purchase and told his clients to move it anonymously through offshore havens before paying it to Mr Anaya’s firm. Mr Barreiro, who has not commented publicly on the case, is also the president of the industrial park that originally sold the land to Mr Anaya’s company. The two people shown in public records to be the firm’s founders are said to be Mr Barreiro’s driver and the wife of one of his employees.

This connection is awkward for Mr Anaya. He says he believed that the purchaser belonged to a local architect who has publicly claimed to own 99% of its shares and may well have bought it from the founders. (That transaction would not be shown in public documents.) Even if the allegations about Mr Barreiro are true, Mr Anaya insists he has done nothing wrong. He has posted online a video in which he contends that it is not his legal responsibility to verify the source of the buyer’s money. The sale contract includes an anti-money-laundering clause, in which the buyer attested that it was paying with money that it obtained legally.

Mr Anaya says that the money his firm used to finance the original purchase is clean, and that its profit reflects market prices. He invited The Economist to inspect documents attesting to that. They show that just over half the cash to buy the property came from a loan secured by his house, which is in his wife’s name. A tenth came from an interest-bearing loan from the industrial park. The Anayas used their savings to finance the rest of the land purchase and the building of the warehouse.

Mr Anaya’s firm paid $63 a square metre for 13,000 square metres of land in 2014. That does not look suspiciously low. A report in 2016 by ProMexico, a government body that promotes investment, put the price of industrial land in Querétaro at $50-95 a square metre. Mr Anaya’s firm spent $1.3m to build a 7,000-square-metre warehouse. Assuming an average exchange rate of 16 pesos to the dollar, that is a cost per square metre of 3,000 pesos. A builder in the area says the going rate to build such a structure is 3,200 pesos.

Having spent $2.2m (including $100,000 in tax) to buy and build, Mr Anaya’s firm sold the property for $2.5m, making a profit of 14% in two years. A property with a building half the size at the same industrial park is listed for 35m pesos, or about $1.9m. That does not suggest that Mr Anaya’s company received an inflated sum for the sale. In 2016 it paid 3.5m pesos ($189,000) in tax. The tax authorities have confirmed that it paid the right amount.

Whether or not Mr Anaya’s defence holds up, the conduct of the case raises questions about the independence of law-enforcement agencies and their relationship to the PRI. Mr Elías Beltrán’s office posted on its Twitter account security footage of Mr Anaya and his entourage visiting its premises. That was unprecedented and illegal, says Armando Santacruz of Mexico United Against Crime, an NGO. The prosecutor’s office also issued a press release falsely stating that Mr Anaya had refused to offer a “ministerial declaration”, a statement from an accused in response to a preliminary investigation. The electoral commission ordered the prosecutor to take down the video and press release. A home video showing Mr Anaya at Mr Barreiro’s wedding in 2005 appeared online after police raided the businessman’s home. Mr Anaya says the bride was the sister of a high-school friend, and denies knowing Mr Barreiro well.

That has not stopped the PRI from hurling accusations at Mr Anaya, seconded by the pro-government press. Going beyond Mr Elías Beltrán’s investigation, they claim that Mr Anaya was laundering money and is beholden to Mr Barreiro. Enrique Ochóa, the PRI’s president, called the PAN candidate “two-faced, a liar and a crook”.

Less partisan Mexicans worry that Mr Elías Beltrán, who received his law degree in 2011, is acting like a political operative. They contrast his pursuit of Mr Anaya with his apparent leniency towards members of the PRI who are suspected of corruption. On March 14th Mr Elías Beltrán decided not to press charges of money-laundering and tax fraud against César Duarte, a PRI ex-governor of Chihuahua. Prosecutors in the state (now governed by Mr Anaya’s party) are still pursuing Mr Duarte for allegedly diverting billions of pesos of public money. He is a fugitive.

In December 2016 executives from Odebrecht, a Brazilian construction firm at the centre of lots of scandals in Latin America, claimed to have paid bribes worth $10m to Emilio Lozoya, a close friend of Mr Peña and an adviser to his presidential campaign in 2012 who became the boss of Pemex, the state-run oil firm. Mr Elías Beltrán sacked the investigator last year, ostensibly for illegally disclosing information about the probe. This month a federal judge suspended the inquiry indefinitely.

All this suggests that the attorney-general’s office has yet to achieve the independence and stature it is supposed to have as part of a new “anti-corruption system” created by Mr Peña. This month 56 intellectuals and activists published a letter accusing the government of politicising institutions to help Mr Meade’s candidacy. Some anti-corruption activists say the PRI is actually trying to help Mr López Obrador. That is because it fears that a President Anaya would crack down harder on corruption.

Mr Anaya’s supporters fear they are witnessing a replay of the election in the state of Mexico last June. Two months before election day Mr Elías Beltrán’s predecessor accused members of the family of the PAN’s candidate of money-laundering. In the end, the prosecutor did not file charges. But the allegations helped the PRI win over voters opposed to the candidate of Mr López Obrador’s party, Morena. The PRI won by three percentage points.

This time, the beneficiary is likely to be Mr López Obrador. His advantage has widened since Mr Elías Beltrán launched his probe of the land deal in February. He leads both Mr Anaya and Mr Meade by more than 15 percentage points, according to Bloomberg’s Poll Tracker. There are other reasons for his ascendancy. Mexicans do not remember earlier PAN governments more fondly than they do those of the PRI. Only Mr López Obrador represents a break with the past. An election with just one round gives him an advantage over rivals scrapping for the anti-AMLO vote.

Without the property scandal, that vote would have been more likely to consolidate around Mr Anaya. The attorney-general’s intervention means that he and Mr Meade are more evenly matched, and less of a threat to Mr López Obrador. Mr Anaya and Mr Meade should hold a two-man debate, the populist cheekily suggested. He is obviously enjoying the spectacle.