Norwegian oil giant Statoil (STO) on Tuesday promised to cut capital spending after it posted its first-ever quarterly adjusted loss after tax, blaming weak and volatile oil markets and lower refining margins.

Net operating profit tumbled to $180 million, down 95% on the same quarter last year, and about 33% below analyst consensus. Statoil made a net loss of $302 million for the quarter, down from a profit of $866 million a year earlier. Sales for the quarter fell to $10.9 billion, down 37% quarter-on-quarter.

It made an adjusted loss after tax of $28 million, down from earnings after tax of $122 million in the first quarter, despite an increase in the average price of a barrel of oil sold by Statoil to $39 a barrel, from $29 in the first quarter.

"The company made operating cash flow of $1.4 billion in the quarter, vs capex of $2.9 billion, leaving the company heavily FCF (free cash flow) negative," noted Goldman Sachs analysts Henry Tarr and Peter Hackworth.

Statoil's after-tax loss was exacerbated by charges at its international unit, where operations in some countries are continuing to pay government duties despite making losses. 

The weaker than expected results echoed Tuesday's earnings miss by BP (BP) - Get Report , which was hurt by weak refining margins it described as the lowest since 2010.

Statoil CEO Eldar Saetre attempted to put a positive spin on the disappointing results claiming that the quarter had delivered "solid operational performance with strong production growth and progress on project development and execution."

Investors weren't convinced. Statoil shares slumped Tuesday morning to 138.30 Norwegian kroner ($152.20), down Nkr4.50,or 3.2%.

Statoil said it would cut spending. Capital expenditure will be reduced to about $12 billion this year, down from a previously announced figure of $13 billion, the company said. Exploration spending will fall to $1.8 billion, down from $2 billion.

Statoil has said it needs oil prices of about $60 a barrel to be net cash-flow neutral in 2017, though that break-even price is targeted to fall to $50 a barrel in 2018. Brent Crude traded Wednesday at $44.59 a barrel.

Statoil will pay a second-quarter dividend of  22 cents per ordinary share and will offer investors the option to take the dividend in stock at a 5% discount to the company's share price.