LONDON - - Oil giant BP and Anadarko, its partner in the well which caused the Gulf of Mexico oil spill, have agreed a settlement on cleanup costs whereby Andarko will pay BP $4 billion -- less than half the amount it may have been forced to pay in court.

BP said Monday that as part of the deal, Anadarko will no longer pursue its allegations of gross negligence against BP and that the deal excludes possible government fines the parties may have to pay.

The London-based oil major's shares jumped on the news, to trade up 4.8 percent at 0724 GMT, outperforming a 2.1 percent rise in the STOXX Europe 600 Oil and Gas index.

This is good progress, said one dealer.

As a 25 percent partner in the Macondo well, Anadarko was obliged to pay 25 percent of the costs of cleaning up the spill, compensating those affected and paying government fines.

It could only avoid this responsibility if it proved BP had been grossly negligent -- something which could, potentially, have added around $18 billion to the total amount of fines BP faced.

BP has said the total bill for the oil spill, including government fines, for which it has taken charges of $3.5 billion, will be $42 billion.

This suggests Anadarko could have faced a total bill of $9.6 billion.

In May, BP agreed to accept $1.1 billion from the third partner in Macondo, Mitsui & Co., to cover its 10 percent share of cleanup costs.

(Reporting by Tom Bergin; Editing by Hans-Juergen Peters)