LONDON (

TheStreet

) -- Oil company

BP

(BP) - Get Report

on Tuesday said it swung to a second-quarter profit of $5.62 billion from a year-earlier loss of $17.2 billion when the company incurred a $32 billion charge from the Gulf of Mexico oil spill.

BP, in a press release, said replacement cost profit was $5.3 billion versus a loss a year of $17 billion. Analysts were expecting replacement cost profit of about $6 billion in the latest second quarter.

The company said production in the quarter fell 11% to 3.4 million barrels of oil equivalent per day as it still feels the effects of the oil spill from April 2010.

BP said production in the third quarter is "expected to reflect the continuation of the divestment program, ongoing seasonal turnaround activity across the portfolio and the ongoing decline in the Gulf of Mexico." BP continues to expect 2011 production "to be in line with our February guidance of around 3.4 million barrels of oil equivalent per day."

BP said it expects future cash flows generated by its worldwide operations to grow faster than output.

"BP is making rapid progress against our priorities," said CEO Bob Dudley. "In February we said we expected 2011 to be a year of consolidation as we reset the focus of the company. This is going well, while it is having the expected near-term impact on our volumes and costs."

-- Written by Joseph Woelfel

>To contact the writer of this article, click here:

Joseph Woelfel

>To submit a news tip, send an email to:

tips@thestreet.com

.