IF THE polls are right, Mauricio Macri, who narrowly won Argentina’s presidency against the odds two years ago, will strengthen his hand in mid-term elections on October 22nd. A good result in the ballot, in which a third of senate seats and half of those in the lower house of congress are being contested, would help him to complete economic and institutional reforms already begun. If that happens, Argentina may at last begin to recover the prosperity for which it was long ago fabled.

Success for the pragmatic, business-minded Mr Macri may also mark the political demise of Cristina Fernández de Kirchner and the ruinously populist brand of Peronism that she espoused for eight years as president until 2015. Ms Fernández, who succeeded her husband, Néstor Kirchner, as president, is expected to win one of three senate seats in Buenos Aires province, by far the most populous. But if, as pollsters predict, her party fails to win the most votes in what was traditionally a Peronist stronghold, the movement, already rent with division, may look for another leader.

Her fall and Mr Macri’s rise are helping to bring about “a realignment of the entire political system”, says Sergio Berensztein, a political scientist. Mr Macri looks likely to become the first democratically elected non-Peronist president to finish his term in office. Business people hope that the result on October 22nd may even presage eight years with Mr Macri in charge, to give him time fully to rebuild the economy.

Even so, he will not have a free hand. His Cambiemos (Let’s Change) coalition will remain a minority in both legislative chambers, though probably with a larger share of the seats. As a result, he will continue the non-confrontational approach he has taken during his first two years in office. He has tried to persuade moderate trade-union leaders and Peronist politicians, many of whom loathe Ms Fernández, to accept reforms, painful as they will be in the short run. “Gradualism is now [Mr Macri’s] religion,” says Mr Berensztein.

Not that he has marked time. In the past two years he has dismantled exchange controls, dropped most export taxes, devalued the peso, settled a dispute with foreign bondholders, opened up to foreign investors and—most riskily—started to remove Ms Fernández’s massive subsidies of electricity, gas, water and transport. “Only 10% of those costs were covered” by user charges, says Marcos Peña, chief of the cabinet of ministers . “Now we’re covering 50%.”

Thanks to such measures, Mr Macri’s first year in office was painful. The economy shrank, wages fell in real terms, inflation shot up to almost 40% and the unemployment rate (hard to measure because a third of workers are off the books) rose above 9% (see chart). This year most signs have pointed the right way, though wages and jobs are recovering slowly and foreign investors are still biding their time. Inflation is down to 22% and falling; growth is back up to nearly 3% and is set to increase next year.

If Cambiemos does well in the poll, the pace of reform should quicken. Transport fares and tariffs for other services are likely to rise again. That makes it unlikely that inflation will fall this year to 17%, the target set by the central bank. But subsidy cuts will squeeze the budget deficit, which should help lower inflation in the longer run. The government hopes to slash inflation from its average of more than 20% under the Kirchners to 8-12% by the end of next year and to 5-8% before the next presidential election, in late 2019. Ideally, Mr Macri would also like to cut labour costs, loosen labour laws, close failing state companies and reduce the unproductive public sector that swelled mightily under the Kirchners. He would like, too, to reform pensions, which Ms Fernández rashly bestowed in full on more than 3m people outside the formal economy who had never made contributions. And he is keen to make the courts more independent. Yet he may still be wary of embarking on such controversial ventures. The slide in Ms Fernández’s reputation with the middle class, and infighting in the Peronist movement, which has always contained a wide range of ideology, are for the moment Mr Macri’s greatest political assets. Accusations of corruption and criminal malfeasance against Ms Fernández and her closest associates, several of whom could face lengthy jail sentences, continue to mount. A judge reopened an investigation into allegations that her government had tried to cover up Iran’s involvement in the bombing of a Jewish community centre in 1994. Three years ago the chief investigator into the case was found dead with a bullet wound in the head hours before he was due to explain his findings to parliament. His death has never been explained. All the same, Ms Fernández has a rock-solid base among the Peronist poor, especially in the southern barrios of Buenos Aires, who still revere her for providing them with jobs, welfare and cheap housing and who tend to dismiss the allegations of corruption against her as politically motivated. Kirchneristas routinely castigate Mr Macri as the spoilt son of a rich man; his father, an Italian immigrant, made a fortune as a government contractor. Ms Fernández, now 64, remains a determined and resourceful fighter.

Mr Macri could yet fall down in several ways, says Alejandro Catterberg, who heads Poliarquía Consultores, a polling firm. A global or Latin American recession could knock his economic plans askew. Infighting could undermine his coalition. Elisa Carrió, a maverick anti-corruption campaigner and Macri ally with a seat in the lower house of congress, will be quick to flag up signs of skulduggery by any of the president’s less angelic business friends. Mr Macri has been on occasion maladroit. His initial response to the disappearance two months ago of Santiago Maldonado, a young activist who was campaigning for a group of disaffected Mapuche Indians and whose body may have been found on October 17th, was seen by many Argentines as frostily insensitive; Mr Maldonado was reportedly last seen alive in the company of gendarmes.

A bigger risk, though, is that Mr Macri’s gradualism will concede too much to Peronism, leaving the state unreformed, its finances shaky and inflation still much too high. Overall, however, the omens have rarely been so promising. “Now is the best moment in the past 20 years for Argentina to change direction,” says Rosendo Fraga, a veteran pundit. That view is widely shared outside Peronist circles. But few who have witnessed Argentina’s roller-coaster history are yet ready to bet on it.

Correction (October 22nd, 2017): A previous version of this piece said that inflation averaged 20% of GDP under the Kirchners. The words “of GDP” have no business being in there, and have been removed.