BP made profits of $5.3bn (£3.2bn) in the three months to 30 June a sit seeks to recover form the Gulf of Mexico oil spill disaster.
Higher oil prices offset lower production Bp said as it unveiled the results.
The so-called replacement cost profit compares with a loss of $17.0bn in the same quarter of 2010, when the company was hit by a massive charge relating to the oil spill off the coast of Louisiana.
In the first quarter of 2011, BP made a profit of $5.5bn.
BP has paid $6.8bn in damages to firms, individuals and government departments since the oil spill.
BP's oil production dropped 11 per cent down on the same period of 2010 as a result of the suspension of drilling in the Gulf of Mexico.
It has also sold $25bn worth of assets.
But the effects of the lower production were offset by the higher oil price, which was inflated by political unrest in oil-producing countries such as Libya.
An explosion at the Deepwater Horizon rig in April last year killed 11 people and caused a massive oil leak.