Brazil's troubled national oil company Petrobras posted a $4 billion loss in 2016 but ended in positive territory for the 4th quarter.
Petrobras, pounded by a giant corruption scandal that is shaking Brazilian politics, said the final 3 months of the year saw a return to profit at $717 million.
That made 2016 better overall than the previous year, when the company recorded an $11 billion loss.
But its $4.2 billion overall loss for 2016 made it the 3rd straight year in the red for the huge company, struck by falling oil prices as well as the corruption affair.
The Petrobras scandal erupted in 2014 and has landed numerous executives and politicians in jail.
Close allies of Brazil's President Michel Temer have been implicated in the affair as he tries to steer the country out of its worst recession in decades.
That has raised the risk of further political instability following the impeachment of his predecessor Dilma Rousseff last year.
The company said in a statement that its earnings fell by 12 % over 2016.
It stressed that it had strengthened its profit margin in diesel and gasoline operations and cut expenses.
The domestic market in recession-hit Brazil declined but exports rose in the 4th quarter.
Petrobras met its production target of 2.1 billion barrels of crude oil a day.
The company's chief executive Pedro Parente told a news conference the firm would however have to keep working to lower its debts.
To read this news in Russian.