Marathon, based in Findlay, Ohio, has operations concentrated in the East while Andeavor, formerly known as Tesoro, has operations in the West.
Andeavor operates two refineries in North Dakota, including the Mandan operation. It also has other related offices in the state.
Shareholders of Andeavor, based in San Antonio, can choose to receive 1.87 shares of Marathon stock, or $152.27 in cash.
Shareholders of Marathon Petroleum Corp. will own about 66 percent of the combined company, with Andeavor shareholders owning the rest. Headquarters will be in Findlay, Ohio, but the combined company will maintain a presence in San Antonio.
The deal is targeted to close in the second half of the year.