The Brazilian federal audit court TCU has ruled that Petrobras can resume its divestment program, although it has to restart the sales of its fuel distribution business BR Distribuidora and other assets.

The decision allows the state-owned energy company to conclude the sale of the two oilfields to Karoon Gas Australia and also complete the sale of its stake in the Saint Malo oilfield in the Gulf of Mexico, Petrobras said in a statement.

Other asset sales, including a controlling stake in the service stations business BR Distribuidora, will proceed under revised rules from the TCU, the audit court said in its ruling.

A federal court suspended the BR Distribuidora sale in December last year, after members of the oil workers’ union Sindipetro challenged the deal in court.

Other federal courts last month barred Petrobras from selling its 90% stake in the natural gas pipeline operator Nova Transportadora do Sudeste (NTS) and also allowed the company to proceed with the sales of two petrochemical subsidiaries, Petroquimica Suape and Citepe, to Mexico’s Alpek for $385m.

TCU asked Petrobras in December to suspend all but five asset sales underway and wait for a final ruling before starting any new ones. Right after that, the company announced a $2.2bn agreement with France’s Total, including the sale of minority stakes in oil fields and thermal power plants.

Petrobras said it is sticking with its plans to sell $21bn in assets in 2017 and 2018 to reduce debt.

S&P Global Ratings last month upgraded Petrobras to BB- from B+ with a stable outlook, citing improved liquidity and a more balanced capital structure.