[Editor's note: this story has been updated from a previous version posted at 7:45 a.m. CT May 2.]

ConocoPhillips (NYSE: COP) reported a surprise quarterly loss on May 2 as operating costs came in higher than Street estimates, sending its shares down as much as 2.4% in early trade.

However, the largest U.S. independent oil producer's results reflected a slow but steady improvement across the industry. Crude prices are stabilizing after a two-year rout as an OPEC-led production cut and a rebound in demand slowly drains a global glut.

The company said its total realized price was $36.18 per barrel of oil equivalent (boe) in the first quarter, compared with $22.94 a year earlier.

ConocoPhillips's production, excluding Libya, inched up 2% to 1.584 million boe/d in the latest reported quarter.

That was higher than Wall Street expectations of 1.571 million boe/d.

"Production was above guidance, but this was outweighed by higher costs," Raymond James analyst Pavel Molchanov said.

The company's operating expenses of $1.30 billion were higher than Raymond James' estimate of $1.24 billion, Molchanov said. While exploration expenses of $258 million on a pre-tax basis were also much larger than the $70 million Barclays analysts had estimated.

ConocoPhillips said it expects production of 1.495 million to 1.535 million boe/d for the second quarter, adding this forecast excludes output from Libya, but does not reflect the impact of recently announced asset sales.

The oil producer said last month it would sell natural gas-heavy assets in San Juan basin to privately held Hilcorp Energy Co. for about $3 billion.

The asset sale came after the company agreed in March to sell oil sands and western Canadian natural gas assets to Cenovus Energy Inc for C$17.7 billion.

ConocoPhillips has also marked other gas-weighted assets for sale, including some assets in the Anadarko Basin, the Barnett Shale field and the Gulf of Mexico.

Net profit was $800 million, or 62 cents per share, in the first quarter ended March 31, compared with a net loss of $1.5 billion, or $1.18 per share, a year earlier.

Excluding a gain on the sale of assets in Canada, the company posted a loss of 2 cents per share. Analysts on average were expecting a profit of 1 cent per share, according to Thomson Reuters I/B/E/S.

ConocoPhillips's shares were down 1.5% at $46.75 in morning trade.

RELATED:

ConocoPhillips Sells San Juan Assets To Hilcorp For $3 Billion

ConocoPhillips Attacks Debt With $13 Billion In Canadian Divestitures