In this handout image provided
Fire boat response crews battle the blazing remnants of the off shore oil rig Deepwater Horizon in the Gulf of Mexico Getty

Oil giant BP reported a loss of $3.18bn (£2.04bn, €2.87bn) in the first half of its 2015 financial year, after a $6.3bn profit during the same period in 2014. Over the first half of its 2015 financial year, the company reported a $7.5bn one-off cost relating to the Deepwater Horizon Spill in 2010.

Profit in the second quarter of 2015 fell to $1.3bn without the settlement costs, 50% lower than profit in the first quarter and was down 63.9% from the second quarter of 2014. The company said it put aside a total of $9.8bn in the half year to repay the spill in the Gulf of Mexico.

"The external environment remains challenging, but BP moved quickly in response and we continue to do so," chief executive Bob Dudley stated. "Our work to increase efficiency and reduce costs is embedding sustainable benefits throughout the Group and we continue with capital discipline and divestments."

However, the high pay-off of the total $18.7bn legal costs relating to the spill was not the only drag on the company's profit. A 1.7% decrease in production and an unfavourable oil price also caused the company's operating sales to fall by 38.15% to $114.84bn in the half year.

Without the legal compensation costs, profit in the 26 weeks would have been down by 43.3% to $3.89bn, from $6.86bn and the company said it expects "lower levels of turnaround activities" for its full year results. BP generated the majority of its profit ($1.63bn) through its downstream division.

The costs of the spill settlements will make it very hard for BP to increase margins until the entire case is settled in 2033. The oil price, which has fallen almost 54% between since 20 June 2015, is in Bear market again in July 2015, and will cause extra problems for the oil giant.

Oil giant BP agreed on 2 July to settle the 2010 Deepwater Horizon spill claims with the US Ministry of Justice, by paying $18.7bn, making it one of the biggest settlements in US history.

BP's subsidiary BP Exploration and Production settled the matter with the Ministry of Justice, the five Gulf States affected (Alabama, Louisiana, Florida, Texas and Mississippi) and 400 local governments.

The company's chairman Carl-Henric Svanberg said in the press release that the settlement, which will be paid out in the 28 years between 2015 and 2033, means BP is living up to its promise to restore the environment after the spill in 2010.

He said: "With this agreement we provide a path to closure for BP and the Gulf. It resolves the company's largest remaining legal exposures, provides clarity on costs and creates certainty of payment for all parties involved."

"In deciding to follow this path, the Board has balanced the risks, timing and consequences associated with many years of litigation against its wish for the company to be able to set a clear course for the future."

Before the settlement, BP had said the government's demands were too harsh as it has invested in the tourism industry, which was heavily damaged by the Deepwater Horizon incident.

The spill, which started by the explosion and sinking of BP's Deepwater and Horizon oil rig in the Gulf of Mexico on 20 April 2010, turned the Gulf into an oil bath for almost three months.

It ruined the environment in the area for years and the wildlife is still affected in 2015. According to the National Wildlife Federation in the US, the Gulf has seen a record amount of dead dolphins since the spill, a third of laughing gulls in the area have died out since, and the oil has further increased the amount of already endangered species in the Gulf of Mexico.