The $3.1 billion deal does plenty for Apache and its shareholders: It diversifies the risk in Apache’s portfolio, it gives the company cash it needs to push operations in the Permian Basin and other areas, and it puts a price tag on assets that are hard to value – after all, it’s difficult to fly investors out to the Egyptian desert, said Mark Hanson, an analyst at Morningstar Inc.

“They knocked it out of the park with this one,” Hanson said in an interview. “Two or three years ago, they could have gotten more for it, but under the circumstances they did well.”

Apache’s stock price closed at $85.68 per share on Friday, and the number of shares trading hands more than tripled the stock’s three month average at 13.9 million shares.

Apache called the deal with Sinopec part of a global strategic partnership between the two exploration and production companies. However, apart from an operating agreement between the companies that involves Apache continuing to operate the assets in Egypt, the partnership doesn’t go much further.

“This was just a first step,” said Bob Dye, a spokesman for Apache. “We’ll have to see where that relationship goes in the future. We don’t have anything concrete to report.”

Egypt, where Apache is one of the major names in oil production, has been one of shareholders’ big concerns. Two years after a political uprising in the Middle Eastern country, Apache investors still worry that Egypt could nationalize its oil production, despite Apache’s claims that the company’s production has gone uninterrupted since the revolution.

About 200 wells in Egypt accounted for 20 percent of Apache’s total oil production last year, at 58.1 million barrels of oil and $4.6 billion in revenue for 2012, according to regulatory filings.

The Egypt asset sale “surprised the Street,” said David Tameron, a senior analyst at Wells Fargo, in an interview. Investors were “concerned that, given the political environment, it’d be tough to get a deal done. The price they got for it, considering the circumstances, showed they did a good job in negotiating that deal.”

In a written statement, Tameron had said that Apache got six times its Egypt cash flow on the deal.

Tameron said the one question left for Apache shareholders is whether or not the company can hit its production guidance, a measure the company has missed in recent years, to the chagrin of shareholders.

In May, Apache shareholders held a revolution of their own when, in a nonbinding vote, they rejected Apache CEO Steven Farris’ targeted compensation for 2013.

Shortly after the shareholder meeting, the company cut Farris’ package by $3 million and promised it would sell off $4 billion in assets this year, half to pay off debt and half to repurchase stock. So far, the company has agreed to unload nearly $8 billion in assets this year, with its biggest sale landing at $3.8 billion for assets in the Gulf of Mexico.