Marathon Petroleum Corp. agreed to buy rival oil refiner Andeavor for $23.3 billion in a deal that would create the largest independent fuel maker in the U.S.

The offer, payable in either cash or shares, values Andeavor at about $152.27 a share, the companies said in a statement on Monday. That’s about a 24 percent premium over Friday’s closing price.

“Why wouldn’t you do this deal?” Greg Goff, chief executive of Andeavor, said on a conference call Monday. “The time is right now, because for this industry, the wind is behind our backs.”

Marathon is focused in the Midwest and Gulf Coast, while Andeavor’s refineries and pipelines are in western states. They are among the biggest beneficiaries of the shale boom, with access to abundant supplies at a discount to global prices. The combination would overtake Valero Energy Corp. as the biggest in U.S.-based oil refining capacity, generating about 16 percent of the nation’s total, according to Bloomberg calculations.

“Wow!,” wrote Matthew Blair, director of refining research at Tudor Pickering Holt & Co., in a report that called Andeavor a “big winner” in a deal that is “extremely positive.” As for Marathon, big synergies will be key, Blair said, adding that regulatory problems should be minimal, “given the disparate geographical markets of each company.”

“This transaction combines two strong, complementary companies to create a leading U.S. refining, marketing, and midstream company, building a platform that is well positioned for long-term growth and shareholder value creation,” Marathon Chairman and Chief Executive Officer Gary Heminger said in a statement on Monday.

The CEO expects annual cost and operating synergies of about $1 billion within the first three years. Given projected cash-flow generation, Marathon’s board also approved share buybacks of $5 billion. Goff will become executive vice chairman of the combined company.

The boards of both companies unanimously approved the deal, which is expected to close in the second half of this year, subject to regulatory and shareholder approvals.

Marathon’s shares fell as much as 8.9 percent and were down 3.3 percent to $78.71 as of 10:14 a.m. in New York, while Andeavor jumped 17 percent to $143.20.

Findlay, Ohio-based Marathon Petroleum is the third-largest U.S. refiner by market capitalization, valued at about $38.6 billion, according to data compiled by Bloomberg. Last year the company sold 5.8 billion gallons of fuel through its Speedway convenience store chain.

Andeavor Assets

San Antonio, Texas-based Andeavor, formerly known as Tesoro Corp., is the fourth-largest, worth $18.7 billion. Phillips 66 is the largest U.S. independent refiner, valued at $51.9 billion. Andeavor’s assets also include 5,300 miles of pipelines and 40 marine, rail and storage terminals.

Last week, Andeavor announced two joint ventures to move crude oil from West Texas to the coast that are poised to begin operations in late 2019. Marathon’s Galveston Bay refinery, which currently sources about 200,000 barrels a day of light domestic oil, could benefit from the pipeline connectivity, Heminger said in a conference call Monday.

One is a pipeline project majority owned by Phillips 66 to haul as many as 700,000 barrels per day of crude from the Permian Basin to the Corpus Christi, Sweeny and Freeport area. The second is a stake in a new marine terminal under development by Buckeye Partners LP that would connect with the pipeline Andeavor and Phillips 66 are planning to build.

Marathon’s natural gas processing capacity will also increase by about 20 percent under the deal, to more than 10 billion cubic feet per day.

The combined entity will be positioned to capitalize from upcoming coking expansion projects that will produce low-sulfur diesel that complies with the upcoming International Maritime Organization rule to reduce pollution from ships. Andeavor’s port assets in California, coupled with Marathon’s in the U.S. Gulf Coast, will give the combined company access to sell fuel to bunker markets.

“Ports are the lifeblood to refining out in those markets,” Heminger said Monday.