BP plunged into the red for the first time in 18 years yesterday as it racked up a huge $32.2 billion bill for the Gulf of Mexico spill.

BP posted a loss of $17 billion for the April-June period following the Deepwater Horizon tragedy.

The firm is replacing Tony Hayward with US citizen Bob Dudley and also announced a shake-up of its portfolio including up to $30 billion in asset sales over the next 18 months.

Mr Hayward - who has committed a series of PR blunders since the crisis began - leaves with a pay-off of one year's salary - £1.045 million - and an £11 million pension pot.

BP chairman Carl-Henric Svanberg said the firm was "deeply saddened" to lose a chief executive whose success "was so widely and deservedly admired".

But he added that the Deepwater Horizon explosion - which left 11 workers dead - had been a "watershed incident".

"It will be a different company going forward, requiring fresh leadership supported by robust governance and a very engaged board," Mr Svanberg said.

Mr Svanberg said the company's estimate of the costs associated with the spill was based on BP's belief that it was not guilty of gross negligence.

And he said the decision to part with Mr Hayward was a mutual one, taken because the company needed to rebuild its reputation.

The BP chairman told the BBC of today's Gulf spill costs estimate: "It's a disaster and there's a lot of cost associated with it and this is the first time we have given an estimate, and that estimate is based on our belief that we are not grossly negligent."

Asked if the company's investigations led it to believe it would not be found grossly negligent and would thus escape harsher penalties, Mr Svanberg replied: "That is our belief, yes."

He added: "It's of course a huge loss that overshadows everything else but the underlying performance of the company is strong.

"This is of course a tragedy and it has large consequences but we have no doubt that we will be able to rebuild the company."

The huge charge paid out by BP includes the direct costs of tackling the spill, clean-up costs for the catastrophe and a $20 billion compensation fund agreed in June.

A programme of asset sales is planned to leave BP with a "smaller but higher quality" exploration and production business, while the company also plans to cut net debts to between $10 and $15 billion from the current $23 billion.

Shareholders in BP - a staple holding for UK pension funds - have already felt the pain as the firm cut its dividend payouts for the first time since the Second World War. It will consider whether to restart share payouts in February next year.

Stripping out the impact of the Gulf, BP said its underlying performance was "very encouraging", with a 72 per cent hike profits of $5 billion - meaning that the company was in "robust shape" to meet its obligations.

The firm's refining and marketing operations posted their best performance since 2006, when refining margins were double their current levels. The US operations also returned to profit for the first time in more than a year.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.