A recovery in oil output and exports helped Petrobras reverse three quarters of straight losses as the Brazilian producer emerges from two years of graft investigations and falling crude prices. The rising production and shipments helped compensate for falling fuel demand amid Brazil’s ongoing recession, the company said in a filing Thursday. Petroleo Brasileiro SA, as the Rio de Janeiro-based producer is formally known, also reduced spending on offshore well interventions. “Petrobras is one of the very few companies in the world that has succeeded at increasing output even amid the oil downturn,” Luana Siegfried, an equity research associate at Raymond James, said by phone from Houston. Petrobras is trying to emerge from the combination of a domestic recession, persistently low oil prices and a sweeping corruption scandal that has triggered a series of write-offs and a class-action lawsuit in the U.S. The company is pursuing spending cuts and is negotiating discounts with oil rig suppliers to help reduce debt. “Petrobras is becoming more predictable,” Chief Financial Officer Ivan Monteiro told reporters in Rio. Pedro Parente, who took over as chief executive officer on June 2, has made progress on a $15.1 billion divestment program designed to reduce the largest debt load in the industry. The producer’s debt surged during the commodities boom because the company was selling imported fuel at a loss to help the government control inflation, and invested heavily in unprofitable refineries. Reducing debt through partnerships and asset sales is one of the company’s biggest challenges, Parente said on Aug. 3. The producer reported a second-quarter profit of 370 million reais ($118 million), compared with 531 million reais a year earlier, according to the filing. The state-controlled oil company posted 20.3 billion reais in adjusted earnings before interest, taxes, depreciation and amortization, or Ebitda. That was in line with the 21 billion-real average of four analyst estimates compiled by Bloomberg. Petrobras booked a 1.2 billion-real impairment after reviewing its Comperj refinery project. A voluntary dismissal program cost another 1.2 billion reais during the quarter, and the company also accounted for some licenses it returned to the oil regulator. Those charges were the reasons why the producer’s net income missed some forecasts, Monteiro said. “These three non recurrent items explain the difference between what analysts expected and the company’s results,” Monteiro said. Potential buyers have expressed growing interest in assets Petrobras plans to sell, including the propane unit Liquigas Distribuidora SA and BR Distribuidora, a fuel distribution unit, Monteiro said. The company continues to hold talks with Brookfield Asset Management Inc. to sell a stake in the Nova Transportadora do Sudeste SA pipeline network, he said. Petrobras is sticking to its divestment target and has already agreed to sell almost $4.6 billion assets in Argentina, Chile and Brazil, including a majority stake in the Carcara offshore oil field to Statoil ASA for $2.5 billion. The company plans to release a new strategic plan in September.