Image caption The 2010 Deepwater Horizon disaster killed 11 workers

Transocean, which owned the Deepwater Horizon oil rig, has agreed to a settlement with the US government.

The Swiss-based company will pay $400m (£248m) in criminal penalties and a $1bn civil fine after pleading guilty to violating the Clean Water Act.

The rig, which was leased by BP, exploded on 20 April 2010, killing 11 workers.

The oil spill damaged the Gulf of Mexico coast causing one of the biggest environmental disasters in US history.

"Transocean's rig crew accepted the direction of BP well site leaders to proceed in the face of clear danger signs at a tragic cost to many of them," said assistant attorney general Lanny Breuer.

In November, BP agreed a settlement with the US government worth $4.5bn, including a $1.26bn criminal fine.

It has spent $14bn on cleaning up the oil spill and compensating local people.

'Closer to justice'

A report from the US Chemical Safety Board in July 2012 criticised both BP and Transocean for having inadequate safety rules.

The two companies disagreed about who was in charge of interpreting a negative pressure test that could have warned workers of the problems.

Transocean's agreement with the Department of Justice still has to be approved by a federal judge.

As part of the settlement, the company has to make a series of improvements to the safety and emergency responses on its rigs.

"This resolution of criminal allegations and civil claims against Transocean brings us one significant step closer to justice for the human, environmental and economic devastation wrought by the Deepwater Horizon disaster," said US Attorney General Eric Holder.

The $1.4bn will mainly be spent on environmental projects, and research and training to prevent future spills.

In a statement, Transocean said: "These important agreements, which the company believes to be in the best interest of its shareholders and employees, remove much of the uncertainty associated with the accident."

The company plans to pay the fines over the next five years.

Its shares rose 6.4% in New York, while BP shares trading in New York rose 1.7%.

Analysts at Barclays said that the settlement was considerably less than they had been expecting Transocean to have to pay.

They noted that Halliburton was now the only one of the contractors that had not yet settled with the Department of Justice.

BP still faces a trial in New Orleans, which is due to begin on 25 February, which could lead to it paying civil damages of $21bn if it is found guilty of gross negligence.