THE Transnordestina railway is supposed to carry soya beans, iron ore and other commodities from farms and mines in Brazil’s northeast to ports in Ceará and Pernambuco, and then on to markets in China. Brazil has spent more than 6bn reais ($1.8bn) on the project since work began a decade ago. But cows still amble along its unfinished tracks. In Lima and Bogotá workers can spend half as much time commuting as they do at the office. In Brito, a village on Nicaragua’s Pacific coast, there are no paved roads, electricity or running water. “It’s like we’re still living in the era of Columbus,” laments a fisherman.

Latin America is hobbled by its inadequate infrastructure. More than 60% of the region’s roads are unpaved, compared with 46% in emerging economies in Asia and 17% in Europe. Two-thirds of sewage is untreated. Poor sanitation and lack of clean water are the second-biggest killer of children under five years old, according to the World Health Organisation. Losses of electricity from transmission and distribution networks are among the highest in the world. Latin America spends a smaller share of GDP on infrastructure than any other region except sub-Saharan Africa (see chart).

There are some bright spots. Chile’s roads are better than those of Belgium, New Zealand and China, according to the World Economic Forum. Uruguay’s electricity and telecoms outclass those in the United States and Canada. But in general, the quality of infrastructure is more of a drag on than a boost to Latin American economies. If the infrastructure of the region’s middle-income countries were as good as that in Turkey and Bulgaria, their growth rates would be two percentage points higher than they are, according to McKinsey, a consultancy.

Recently a window of opportunity to upgrade it opened up. Global interest rates have been unusually low, which makes it cheap to raise money to repair old infrastructure or start new projects. Market-friendly presidents have taken office in several countries, including Brazil, Argentina and Peru. They have made improving infrastructure a priority. Pedro Pablo Kuczynski, Peru’s president since July 2016, promised to turn the country into a “construction camp”. Mauricio Macri, elected Argentina’s president in 2015, launched an infrastructure plan called Plan Belgrano for the country’s poorly connected north. His cabinet chief, Marcos Peña, calls it “the most ambitious in Argentina’s history”. In Colombia a promise to build rural infrastructure is part of the peace agreement between the government and the FARC, a leftist guerrilla group that had been at war with the state since 1964.

A window closes

But the region’s governments have not made the most of the opportunity. A big setback was the Lava Jato (Car Wash) investigation, which began as a money-laundering case in Brazil and has engulfed the governments of a dozen Latin American countries. Odebrecht, a Brazilian firm that built highways, dams, power plants and sanitation facilities across the region, admitted to paying $788m in bribes. Its money financed political campaigns, including those of Colombia’s president, Juan Manuel Santos and Juan Carlos Varela, now Panama’s president. Mr Kuczynski has admitted that companies linked to him have taken (legal) payments from Odebrecht.

The scandal has left a trail of unfinished projects, frightened politicians and bureaucrats, and wary bankers. A $7bn contract with Odebrecht to build a pipeline to transport natural gas from the Amazon basin across the Andes to Peru’s coast has been annulled and work has been suspended. Ruta del Sol 2, a 500km (300-mile) stretch of highway to help connect Bogotá to Colombia’s Caribbean coast, has stalled. Panama’s government cancelled a contract with Odebrecht for a $1bn hydroelectric project. Mexico’s biggest scheme, a new airport near the capital, has been plagued by corruption allegations. Andrés Manuel López Obrador, the front-runner in Mexico’s presidential election, scheduled for July 1st, has threatened to scrap it.

Governments also worry that a rise in interest rates will raise the cost of borrowing to build infrastructure and that a reduction in corporate tax in the United States, signed into law by Donald Trump in December, will pull capital away from Latin America. They are racing to get their infrastructure plans back on track before the opportunity passes.

The biggest need, say economists, is for roads, railways, ports and urban transport to speed exports and the travels of workers. To move sugar from Jujuy in northern Argentina to Buenos Aires by rail, a journey of 1,675km, takes 22 days, as long as it takes to ship it on to Hamburg. Cargo can take two days to journey from Bogotá to Santa Marta on the Caribbean coast; then it can wait as long to pass through customs.

A big difficulty in widening such bottlenecks is cumbersome procedures, legal hurdles and ponderous bureaucracies. A new airport near Cusco, Peru’s most popular tourist destination, was proposed in the 1970s; a contract to build it was signed in 2014 but scrapped last year. Projects often impinge on indigenous lands, which can slow things down further. Conflicts over projects cause average delays of five years, according to a study by the Inter-American Development Bank.

Despite low interest rates, governments cannot borrow much to pay for infrastructure. Non-financial public-sector debt rose from 30.6% of GDP in 2008 on average in Latin America to 40.4% in 2016. In Brazil it reached a record of 74.4% last year. Brazil, Chile, Colombia and Peru have rules that limit public spending or borrowing.

Privacy, please

So governments must form partnerships with private enterprises, says Jose Fernandez, a former assistant secretary in America’s State Department. They are no panacea. Public-private partnerships (PPPs) are open to abuse by construction firms such as Odebrecht, which make low bids to secure contracts and then renegotiate them to push up the cost, often by bribing a politician or two. More than three-quarters of Latin American PPP contracts in transport have been renegotiated within about three years of signing, according to José Luis Guasch, a professor of economics at the University of California.

PPPs require competent agencies and often government guarantees, as well as sophisticated domestic financial markets. In Chile, which has strong institutions and financial markets, most roads, ports and airports are operated by private companies. In most countries private participation is a complement to, rather than a substitute for, public money, the World Bank argues. The region’s volatile politics makes investors wary. Michel Temer, Brazil’s centrist president, is dogged by scandal and will not run in the presidential election in October. Mexico’s election may bring the populist Mr López Obrador to power. In Peru congress is threatening to impeach Mr Kuczynski, who narrowly avoided impeachment once before.

Not all the news is bad. One reason for cheer is that infrastructure can be less expensive than governments think. With conventional policies, South America needs to spend $23bn-24bn a year to upgrade its electricity networks, according to the World Bank. But if the region manages demand better, introduces renewable sources of energy and promotes conservation, it can cut that cost to $8bn-9bn. Freight can be sped up and made cheaper by simplifying bureaucracy and improving regulation as well as by expanding roads. Latin America’s trucking industry is now 15 times more concentrated than that of the United States, the World Bank says. Promoting competition would reduce costs.

A second source of encouragement is China. Its banks invest more in Latin America’s infrastructure than the World Bank and IDB combined, according to David Dollar of the Brookings Institution, a think-tank in Washington. Last year Chinese companies invested at least $21bn in Brazil, not least in power plants and ports. Bolivia has a $10bn Chinese credit line to spend on motorways and hydroelectric dams. China has agreed to build two nuclear-power plants in Argentina. But some Chinese ideas, like a railway through the Amazon and a canal through Nicaragua to rival the Panama canal, may never materialise.

Latin American countries may be learning from their mistakes. The scandals are changing how business is done. Companies are increasing radically the number of compliance officers, says Brian Winter, vice-president for policy at the Americas Society and the Council of the Americas. New laws seek to bring more transparency and strike a balance between discouraging corruption and chilling investment. Legislation in Peru, for example, exempts from penalties firms that co-operate with anti-corruption investigators.

Some countries, including Colombia and Peru, have passed laws that make it harder to renegotiate PPPs. Brazil’s plan for 34 partnerships in roads, ports and other projects seeks to reduce red tape by making sure that they have environmental licences before their details are announced.

Such reforms improve the chances that Latin America’s president-builders will eventually realise their ambitions. Repairers are at work on the rail line through Jujuy. Peru’s government hopes to find new investors in the gas pipeline this year. With the right policies, honestly executed, rolling stock, rather than livestock, could someday glide along the tracks of the Transnordestina railway.