A Petrobras Oil platform is seen at Guabanara bay in Rio de Janeiro September 24, 2010. REUTERS/Bruno Domingos

NEW YORK (Reuters Breakingviews) - Energy-sector reform is up in the air in both Brazil and Mexico. In the coming year, new regimes in Latin America’s two biggest economies will wrestle with balancing 1970s-style nationalism against the need to open up to foreign and private capital to exploit their oil and gas resources. Jair Bolsonaro, Brazil’s far-right president-elect, has better prospects of getting it right than left-winger Andrés Manuel López Obrador in Mexico.

There is a strong nationalist element in ex-army captain Bolsonaro’s thinking about Brazil’s natural resources, which include massive untapped oil and gas reserves. Yet the appointments he has announced before taking office on Jan. 1, 2019 show that the influence of his pro-market economic guru, Paulo Guedes, is powerful too.

The outcome will be a compromise. Petroleo Brasileiro, the state-controlled oil firm, won’t be privatized, as Guedes and the company’s chief executive-designate, Roberto Castello Branco, have argued in the past it should be. But Petrobras will sell off non-core businesses, shedding refineries and distribution operations worth billions of dollars and paying down more of its net debt of some $78 billion. A successful program of auctions that has lured oil majors such as Exxon Mobil, Royal Dutch Shell and BP to invest in Brazilian oil fields is likely to continue.

Prospects are murkier in Mexico, where the man widely known as AMLO, a populist like Bolsonaro though of opposite ideology, took over as president on Dec. 1. The new leader has chilled investor sentiment by saying his government will examine more than 100 contracts awarded since liberalization of the oil and gas sector five years ago. He will respect them if no corruption is found, he says, but has shown little enthusiasm for more auctions.

Instead of private and foreign investment, López Obrador wants to rely on state oil company Petroleos Mexicanos to boost dwindling production by some 40 percent during his six-year term. After decades of neglect, Pemex is in poor shape to do so. To help boost gasoline production, meanwhile, AMLO pledged to build a new $2.5 billion crude refinery in the southern state of Tabasco, a plan approved in an informal referendum in late November, albeit with a turnout of just 1 percent of voters. Not only is that no way to run an energy policy, it also leaves the sector even more stubbornly under government control.

- This is a Breakingviews prediction for 2019. To see more of our predictions, click reut.rs/2R6H5pG