Updated

Oil producer BP swung to a profit in the first quarter as rising crude prices and cost savings erased losses in the same period last year.

BP on Tuesday reported net income of $1.45 billion versus a year-earlier loss of $583 million. Underlying replacement cost profit rose to $1.51 billion from $532 million. The profit measure, which excludes one-time items and fluctuations in the value of inventories, is the industry's preferred gauge of earnings.

Brent crude, the international benchmark for oil prices, averaged $53.69 a barrel in the quarter, up 58 percent from a year earlier.

BP set aside $161 million in the quarter for the aftermath of the 2010 Deepwater Horizon oil spill in the Gulf of Mexico, bringing total charges to $62.75 billion.