British oil giant BP announced its first-quarter results Tuesday, and reported a pretax loss of $485 million, down from a profit of $2.1 billion during the same period a year ago. But after removing one-time expenses and impairment charges, the resultant underlying profit of $532 million for the quarter ended March was significantly higher than analysts’ estimate of a loss.

The company said a poll of analysts had put the expected underlying loss at $140 million, while a Bloomberg poll put the figure at $244.9 million, and turning a profit instead, BP outperformed both those figures. However, BP’s underlying profit for the quarter was still 80 percent lower than the $2.6 billion it earned during the first quarter last year.

Excluding expenses related to the Gulf of Mexico spill, BP reported $3 billion in net cash provided by first-quarter activities, up from $2.5 billion a year ago. However, net debt has also gone up to $30 billion at the end of the first quarter, up from $25.1 billion during the same period last year.

BP’s earnings per share fell sharply during the quarter, with the ordinary shares — traded on the London Stock Exchange — earning 2.88 cents, compared to 14.14 cents during the first quarter of 2015.

The company announced a dividend of 10 cents a share for its ADR shares traded on the New York Stock Exchange, payable in June. BP also said it would announce the dividend for its ordinary shares, payable in pounds, on June 7.

Bob Dudley, BP group chief executive, said in a statement on the company’s website: “Despite the challenging environment, we are driving towards our near-term goal of rebalancing BP’s cash flows. Operational performance is strong and our work to reset costs has considerable momentum and is delivering results. Furthermore, development of our next wave of material upstream projects is well on track.”

Like all other oil companies, the oil giant has been severely affected by low oil prices, which averaged about $34 during the quarter, about $10 lower than the previous quarter and about $20 less than the same quarter a year ago.

BP took a pretax hit of $917 million during the first quarter in relation to the Deepwater Horizon disaster in the Gulf of Mexico. Its cumulative pretax charges related to the disaster since April 2010 now stand at over $56 billion.

The company’s shares were trading about 3 percent higher during early trade Tuesday on the London Stock Exchange.