BP PLC (NYSE: BP), the third-largest energy company, is in talks to sell its huge Texas City, Texas, refinery to Marathon Petroleum Corp. (NYSE: MPC) to help pay for the cost of the 2010 Deepwater Horizon oil spill, the Financial Times reported.

The refinery could sell for as much as $2.5 billion, an unnamed source told FT. The Texas City refinery processes 475,000 barrels per day and is the third largest in the U.S. BP produced around 920 million barrels of oil and gas in 2011.

London-based BP has already raised $32 billion of the $38 billion by the end of 2013 to pay for lawsuits tied to the Gulf disaster, also known as the Macondo blowout for the name of the well. Stephen Simko, an analyst with Morningstar Inc., valued BP's fine liabilities at $13 billion from mid-2012 onward.

"To us, the key takeaway is that BP's Macondo nightmare is far from over, and billions more will flow out the door during the next few years," wrote Simko in a research note.

The global economic slowdown has also lessened the demand for oil, encouraging companies to sell assets. In August, BP sold its Carson, Calif., refinery to Calgary-based Tesoro Corp. (NYSE: TSO) for $2.5 billion.

BP's Texas City refinery had an explosion in 2005, and the company paid $50 million in 2007 after pleading guilty to a felony charge of lacking maintenance at the site. It was hit with another fine of $87 million in 2009 from the Occupational Safety and Health Administration.

Marathon is the fifth-largest U.S. refiner and operates six plants, including one in Texas City. It was split off from Marathon Oil last year.

Shares of BP were up 30 cents, or 0.70 percent, to $43.16, while shares of Marathon gained $1.13, or 2.17 percent, to $53.20.