Petrobras has raised more cash after it agreed to sell a 90% stake in a natural gas pipeline unit for $5.2bn to a consortium led by Canadian investor Brookfield.

The state-backed energy company will retain a 10% stake in Nova Transportadora do Sudeste, or NTS, which runs a pipeline system in southeastern Brazil. 

Most of NTS’ assets were installed over the last ten years, transporting natural gas from neighboring Bolivia and Brazil’s offshore oil and gas fields and connecting the states of Minas Gerais, Sao Paulo and Rio de Janeiro.

“This is a unique opportunity to invest in a large-scale, high quality utility business and participate over time in Brazil’s growing gas industry,” said Sam Pollock, chief executive officer of Brookfield Infrastructure.

Under the terms, Petrobras will receive an upfront payment of $4.3 bn when the transaction closes. The remaining amount will be paid five years later.

Brookfield is joined in the purchasing consortium by Chinese and Singaporean sovereign wealth funds China Investment Corporation and GIC PTE Ltd. as well as British Columbia Investment Management Corp.

The sale comes days after Petrobras announced it was scaling back its investment plans between 2017 and 2021. It plans to sell a total of $15.6 billion in assets this year and $19.5 bn between 2017 and 2018.

Petrobras is the world’s most indebted oil and gas company and asset divestitures remains integral to reducing some $125bn in debt.

Latin America’s largest oil company, Petrobras has been lashed by weak oil prices and a mammoth corruption scandal.