Shares of Marathon Petroleum (MPC) climbed more than 7% to an all-time high of $59.74 on Monday after the petroleum refiner said it inked a deal to buy BP’s (BP) 451,000 barrel per day Texas City refinery.

The purchase will run Marathon up to $2.5 billion, including a base price of $598 million plus inventories estimated at $1.2 billion. The company may also be responsible for another $700 million over six years, subject to certain conditions.

The move is part of larger efforts by BP to shed global assets as it struggles to cover the cost of the 2010 Deepwater Horizon oil spill that is expected to cost the British oil giant billions of dollars.

Under the terms of the agreement, Findlay, Ohio-based Marathon Petroleum will also acquire three interstate NGL pipelines originating at the refinery, shopper history on BP’s Colonial Pipeline Company representing 50,000 barrels per day, four light product terminals in Florida, North Carolina and Tennessee, retail marketing contract assignments for about 1,200 branded sites representing nearly 64,000 bpd of gas sales and a 1,040 megawatt cogeneration facility.

“This world-scale refinery and related assets complement our current geographic footprint and align well with our strategic initiative of growing in existing and contiguous markets to enhance our portfolio,” Marathon Petroleum CEO Gary Heminger said in a statement.

The transaction is expected to be accretive to Marathon’s earnings in the first year of operation and Heminger said it will provide the company the ability to capture synergies across its existing Gulf Coast operations, while expanding its retail presence in the southeast U.S., closer to export markets.

The BP Texas City refinery, one of the largest and most complex in the U.S., is strategically positioned to provide products throughout the Gulf of Mexico, Midwest and Southeast. The facility has the ability to process a wide range of crude oils and has access to mid-continent and Canadian crudes which are often more price-advantageous due to pipelines and cargoes.

BP first announced it would put the refinery, which was the site of a 2005 explosion that killed 15 people, on the block in 2011.

The oil giant has said it is trying to dispose of as much as $38 billion in assets by the end of 2013. It has already recorded some $32 billion in asset sales since the disaster in the Gulf of Mexico.

Follow Jennifer Booton on Twitter at @Jbooton