(Bloomberg) — BP Plc posted a 45% slump in earnings, pointing to a poor set of results from the industry as oil production barely breaks even and profits from refining sputter.

The U.K. company, the first oil major to report second-quarter results, said adjusted profit dropped to $720 million from $1.3 billion a year earlier, missing analyst estimates. Weak refining margins weighed on the downstream result.

BP’s earnings signal trouble for the world’s major energy producers, which relied on refining profits last year to weather crude’s collapse. While Chief Executive Officer Bob Dudley continues to rein in spending, he faces a difficult road ahead as debts climb and oil’s rally fades amid slowing demand growth and returning production from Canada to Nigeria. The company’s top global competitors report later this week.

“There will be weakness in the second half of this year because of refineries,” said Ahmed Ben Salem, an analyst at Oddo & Cie in Paris. “Even though the companies have been successful in reducing costs, there are still some big challenges ahead for BP and the other oil majors.”

BP’s shares fell 1.3% to 434.60 pence, the lowest this month, in London trading. The stock was the second-biggest loser in the 20-member Stoxx Europe 600 Oil & Gas Index.

While Brent crude is up almost 60% from its January low, the industry is still contending with a cocktail of problems. Second-quarter refining margins were the lowest for the period since 2010 and will remain under “significant pressure,” while oil and gas production is barely profitable, BP said in a statement. The company took on an extra $900 million in debt in the period to maintain dividends, and cut spending further.

Capital expenditure was just $8.1 billion in the first half, allowing BP to tweak its full-year budget to less than $17 billion from an earlier forecast of “about” $17 billion.

Adjusted quarterly cash flow from operations was $5.5 billion. That figure, which excludes provisions for liabilities related to the 2010 Gulf of Mexico oil spill, is “surprisingly strong” and will limit the drop in BP shares, said Jason Gammel, a London-based analyst at Jefferies International Ltd.

At the end of the quarter, net debt totaled $30.9 billion, up from $24.8 billion a year earlier. Net debt to capital, also known as gearing, was at 24.7%, compared with 18.8% previously. The company announced a quarterly dividend of 10 cents a share.

Oil Spill

BP this month gave its final estimate of all costs related to the 2010 oil spill, saying it expected liabilities to total $61.6 billion. That allows the company finally to draw a line under the disaster and improve “earnings visibility” for investors, said Alex Brooks, an analyst at Canaccord Genuity Group Inc. in London.

BP says it will be able to balance cash flow with shareholder payouts and capital spending at an oil price of $50 to $55 a barrel next year. Benchmark Brent is currently trading below $45 a barrel in London. That’s down from an average $47.03 in the second quarter and $63.50 a year earlier, but up from $35.21 in the first quarter of this year.

The price decline that began in mid-2014 forced explorers to delay projects, cut billions of dollars of spending and eliminate thousands of jobs. BP’s production was 2.09 million barrels of oil equivalent a day in the second quarter, 1% lower than a year earlier. Third-quarter output will continue to fall because of maintenance, BP said.

Dwindling Downstream

Downstream earnings fell to $1.51 billion from $1.87 billion. While cheaper crude previously boosted income for BP’s refineries, margins have been contracting. Global refining margins averaged $13.80 a barrel in the quarter through June, and have dropped to $10.70 a barrel this month, according to the company’s website.

At the same time, the rebound in crude prices is petering out. Production shuttered by wildfires in Canada and by militant attacks in Nigeria is returning and shale drillers in the U.S. are bringing back some rigs. While there’s still consensus that the worst of the oil glut is over, the International Energy Agency cautioned this month that “the road ahead is far from smooth.”

Royal Dutch Shell Plc and Total SA are scheduled to publish earnings on Thursday, and Exxon Mobil Corp. and Chevron Corp. the following day.

Bloomberg News by Rakteem Katakey