BP Plc said on Tuesday it reached a deal to sell $7 billion in assets to Apache Corp as the British oil company raises money to cover costs related to the oil spill in the Gulf of Mexico.

Apache, known for buying undercapitalized assets from oil majors and making them produce more, has made several sizable acquisitions in recent months.

In this purchase, the independent U.S. oil and gas company will buy oil and gas properties in Texas, western Canada and Egypt, and BP will get a $5 billion cash deposit on July 30 as part of the deal.

BP shares rose 1 percent in after-hours trading.

We have achieved an excellent price for a set of properties that are worth more to others than BP, Chief Executive Tony Hayward said in a statement.

The divestment is part of BP's previously announced plan to sell $10 billion in assets for costs related to the crude oil leak caused by its deepwater Macondo well. The well ruptured after an explosion on April 20, killing 11 workers and causing an environmental disaster.

Earlier in the day, BP said it would sell $1.7 billion worth of assets in Vietnam and Pakistan.

Apache will fund its deal with debt, equity and cash. The exploration and production company plans to issue 21 million common shares and $1.1 billion of convertible preferred shares, and its stock fell 2.6 percent in extended trade as a result.

MAJOR DEALS

Apache has made a living off the sales packages of majors, Chief Executive Steve Farris said on a conference call with analysts to discuss the acquisition.

Apache also has a history of doing deals with BP, including its 2003 purchase of the Forties field in the North Sea.

The latest BP properties fold in well geographically with those of Houston-based Apache, which recently made a big bet on natural gas in western Canada and has operations in Egypt and the Permian Basin.

For BP, it delivers the cash flow that everybody thinks they need, said Ben Dell, a Wall Street analyst at Bernstein Research. For Apache, it's got very good overlap with their existing assets.

Sources familiar with the matter said BP and Apache had discussed various configurations for their deal, including the sale of some of its stake in the Prudhoe Bay oil field in Alaska, before settling on the eventual transaction.

Media reports by Reuters and other media organizations over the past week had focused on a possible Prudhoe Bay sale, valuing that potential deal as high as $10 billion.

Alaska for BP is an area that they've had issues with spills and pipeline leaks, said Ken Carroll, an analyst with Johnson Rice & Co who follows Apache. They've been getting a lot of push back from regulators. That was something that Apache would have been stepping into, which would be a bit of an unknown in terms of liability.

TOO MUCH?

Bernstein Research's Dell said there was an execution question for Apache, given what a busy year it has had in terms of acquisitions.

They've done a lot of deals lately. Can they integrate these while keeping up performance? wondered the analyst, who has an outperform rating on Apache.

Apache is still putting the finishing touches on its acquisition of Mariner Energy Inc , a big investment in the Gulf of Mexico back in mid-April that was valued at $2.7 billion at the time it was agreed.

In June, Apache also completed its $1 billion purchase of Devon Energy Corp's shallow water drilling assets in the Gulf of Mexico.

Apache has also strengthened its presence in Canada. It is partners with Encana Corp in the Horn River shale gas play in northern British Columbia and has bought 51 percent of a planned LNG liquefaction project on the Pacific Coast.

Apache said in a separate news release that its second-quarter net income rose 94 percent from a year-ago to $860 million, or $2.53 per diluted share, helped as output in its international operations resulted in record production.

Production in the quarter totaled 646,866 barrels of oil equivalent (boe) per day, up 10 percent from a year earlier.

(Additional reporting by Michael Erman in New York, Braden Reddall in San Francisco and Scott Haggett in Calgary; editing by Robert MacMillan, Bernard Orr and Andre Grenon)