Source: Marathon Petroleum

The last box needing to be checked off before Hess (HES 0.43%) transforms itself into a pure-play exploration and production company was the separation of its retail operations. With nearly 1,300 convenience store locations, Hess is the largest convenience store owner on the East Coast and has been ruminating since earlier this year whether to sell or spin them off.

So following months of speculation, Marathon Petroleum (MPC 0.71%) ended up making the choice easy, agreeing to buy the retail operations for $2.87 billion, a transaction that will see it become the largest company-owned and -operated convenience store chain in the nation based on revenues and the second largest by store count. Marathon operates 1,480 Speedway c-stores in nine states in the Midwest, and the union with Hess' retail business will see it expand into 16 more states.

The transaction also lets Marathon supplant Hess as the largest franchisee of Dunkin' Donuts stores with more than 650 shops. Hess also operated a number of Wendy's, Dairy Queen, and Bojangles restaurants at its travel plazas, and recently entered into a partnership with Burger King Worldwide.

The acquisition follows a similar one earlier this month by Energy Transfer Partners (ETP), which agreed to take over the 630 Stripes c-stores from Susser Holdings that it will add to the 5,000 or so Sunoco retail outlets it picked up two years ago. That deal was worth $1.8 billion.

Hess says it will use the sale proceeds for additional share buybacks. Under its existing repurchase program, which it increased from $4 billion to $6.5 billion, the E&P company has bought back approximately $2.8 billion worth. Streamlining and narrowing its focus follows the lead set by industry peers ConocoPhillips and Marathon Oil that also shed their retail operations from their oil and gas production activities.

The deal will be transformative for Marathon. In addition to its own network of retail locations, and the thousands of Hess stations that will be rebranded under the Speedway logo over the next three years, Marathon also sells fuel at 5,200 independent retail outlets, a common strategy employed by refiners to sell fuel. The combined company will have $27 billion in annual revenue, 6.2 billion gallons in fuel sales a year, and $4.8 billion worth of merchandise sales. Marathon anticipates saving some $120 million annually with an additional $70 million coming from improving margins at the Hess locations.

Those retail shops were seen as a lucrative jewel for a number of potential bidders, including Alimentation Couche-Tard, which has most of its Circle K assets in Canada, but is one of the largest retail operators in North America, and even BJ's Wholesale Club, which has around 200 wholesale clubs in 15 eastern states, half of which feature gas stations. Analysts say Hess received a price at the high end of the spectrum anticipated for a sale and brings to $12.2 billion the total Hess has realized from asset sales since it began calving them off last year.

For anyone wondering what will happen to the iconic Hess toy truck that is sold each Christmas, it will continue to be sold at Hess retail stores through the end of this year then beginning in 2015 will be sold exclusively online. Begun as a marketing tool to encourage motorists to buy more Hess gas some 50 years ago, the Hess truck has become a major collector's item with an original 1964 model going for around $2,000 or so on auction sites.

Hess began the strategic realignment last year after fending off a proxy battle from activist shareholder Elliott Management that saw the private equity firm gain three seats on the E&P's board. It had argued Hess had become more concerned about its international operations, even though a boom in shale oil and gas was happening right in its backyard, which it got into late.

With a board that's been cleaned of its cronyism and has a new narrowed focus on its strengths, Hess will be better able to participate in the energy boom that will likely continue for years to come. With shares at five-year highs, investors are already benefiting from the change. Marathon Petroleum can also march forward with an expansive foothold on the East Coast that may allow it to march higher, though the price it paid for the privilege may cause some investors to balk.