Brazil’s state-controlled oil company Petroleo Brasileiro SA (NYSE: PBR) reported a surge in third-quarter net profit, helped by a pick-up in oil prices and the weakening of the real currency, the company said on Nov. 6.

Petrobras made a net profit of 6.644 billion reais (US$1.78 billion), well above the 266 million reais it posted a year earlier. Adjusted EBITDA rose to 29.856 billion reais from 19.223 billion in the same period last year.

Petrobras said its growing share of the domestic diesel market also contributed to the strong earnings, as a diesel subsidy program put in place in June to quell a truckers’ strike over rising fuel costs hit the company’s competitors.

Petrobras said it received 1.6 billion reais from the government as part of the second phase of the subsidy program, which is set to end in December.

But the state oil group said its performance was hit by the payment of a US$853.2 million fine to settle charges by U.S. authorities that former executives and directors of the company broke U.S. anti-corruption laws.

Still, the deal represented another major step for the oil company in removing legal uncertainty left over from the so-called Car Wash investigation which revealed a graft scheme that cost the state-run company billions of dollars.

Net debt at the world’s most indebted listed oil company rose slightly to 291.834 billion reais (US$78.30 billion) from 284.027 billion reais in the second quarter. Petrobras managed to lower its net debt to EBITDA ratio to 2.96 from 3.23 in the second quarter, as it seeks to reach 2.5 by year-end.

The company's efforts to sell off $21 billion in assets in the 2017-2018 period have been hampered by legal hurdles and union resistance, but it could offload another $20 billion through 2019, a source told Reuters last month.

Petrobras said cash flow reached 21.925 billion reais (US$5.88 billion) in the quarter while sales revenue grew to 98.26 billion reais, up from 71.822 billion in the same period last year.

($1 = 3.7269 reais)