What happened

Shares of Andeavor (ANDV) surged more than 16% by 10:30 a.m. EDT on Monday after agreeing to merge with Marathon Petroleum (MPC 0.88%) to create the largest independent refiner in the U.S.

So what

Marathon Petroleum announced that it sealed a deal to acquire Andeavor for $35.6 billion in stock and cash. That valuation implies a deal price of $152.27 per share, which is a 24.4% premium to Andeavor's trading price before the announcement. Investors will have the option of choosing to receive 1.87 shares of Marathon Petroleum's stock, or $152.27 in cash, for each share of Andeavor they own, subject to proration so that only 15% of the shares convert to cash.

Double exposure of a handshake and a refinery plant in the background.

Image source: Getty Images.

This transaction will create a leading integrated energy company, and the country's largest independent refiner, with a nearly $90 billion enterprise value. It will also be immediately accretive to Marathon's earnings per share and cash flow while generating an estimated $1 billion of cost and operating synergies in the coming years. Because of that, Marathon Petroleum expects to repurchase an additional $5 billion of shares over the next five years.

One other thing the deal does is create some uncertainty for Andeavor's MLP Andeavor Logistics (ANDX), which is why units tumbled nearly 10% in early morning trading. Andeavor Logistics had been on a growth trajectory, with plans to increase earnings from $1 billion last year up to as much as $1.5 billion by 2020. However, because Marathon already controls another MLP, MPLX, it will likely shift this growth to that entity, and could eventually merge Andeavor Logistics into MPLX.

Now what

Marathon Petroleum expects to close its merger with Andeavor in the second half of the year. While investors could cash out today, it might make sense to continue holding for the long-term because the combined company would be one of the top refiners in the country as well as control a premier midstream operation. Those businesses should generate significant cash flow, a considerable portion of which Marathon expects to continue sending back to investors via dividends and buybacks, which should create more value for them in the coming years.