Marathon Petroleum Corp.’s $23 billion deal to buy rival Andeavor will create the largest American oil refiner just as an oil-price surge and growing global demand for fuels set the stage for an extended industry rally.

The U.S. refining business, once seen as cash-gobbling assets that weighed down lucrative drilling units, has been one of the most profitable sectors in the U.S. economy in the past five years.

Marathon’s shares have nearly tripled since the company was spun out of parent Marathon Oil Corp. in 2011. Andeavor also has had a meteoric rise in that time, quintupling as it moved to buy refineries from giants such as BP PLC and consolidate plants from New Mexico to Minnesota.

“The time is right now because for this industry, the wind is behind our backs,” Andeavor Chief Executive Greg Goff said.

The cash-and-stock deal values Andeavor at $152.27 a share, a roughly 24% premium over Andeavor’s closing price Friday after the stock surged about 50% in the past year. The Wall Street Journal reported Sunday that such a deal could be announced Monday.