(CNN) -- Oil giant BP is back in the black, announcing profits of $5.3 billion just a year after the Deepwater Horizon disaster left it facing heavy losses.
The company said rising oil prices had helped it record a second quarter replacement cost profit of $5.309 billion -- despite an 11% slump in production.
In the same quarter last year, BP made a loss of $16.973 billion, because of costs related to the Gulf of Mexico oil spill.
BP has paid out $6.8 billion to repair environmental and economic damage in the region.
The company's CEO, Bob Dudley, told CNN that BP had come a long way in the past 12 months.
"It was only a year ago -- just -- that oil was still flowing into the Gulf... We've re-stabilized the company, re-strengthened the balance sheet.
"We've announced new exploration deals across the globe, our credit ratings have increased, and we're back heading in the directions we need to."
An explosion on the Deepwater Horizon oil rig on April 20, 2010, killed 11 workers and left 205 million gallons of oil pouring into the Gulf of Mexico.
Several efforts to contain the spill failed, and the well was not sealed until August, leading to widespread criticism of BP.