Brazil's troubled national oil company Petrobras posted a $4.255 billion loss in 2016 but ended in positive territory for the fourth quarter, executives said Tuesday.

Petrobras, which has been pounded by a giant corruption scandal shaking Brazilian politics, said the final three months of the year saw a return to profit at $717 million.