A new powerhouse has been born in the oil industry just as prices spring back to life.

Marathon Petroleum (MPC) reached a $23 billion deal on Monday to scoop up rival Andeavor (ANDV), creating the largest oil refinery in the United States.

The combined company will be able to process more than 3 million barrels of crude per day, representing 16% of the nation's total capacity. Marathon also owns the Speedway, the No. 2 gasoline and convenience store chain in the United States.

The energy deal underscores the health of the refining business thanks to soaring appetite for gasoline that has kept their facilities humming.

"For this industry, the wind is behind our backs," Andeavor CEO Greg Goff told analysts during a conference call.

Global oil demand grew during the first three months of 2018 by the most in nearly eight years, according to Goldman Sachs.

"The state of refining in the United States is very healthy," said Matt Smith, director of commodity research at ClipperData.

Marathon agreed to pay $30.4 billion for Andeavor, including debt. That would make it the biggest global oil and gas deal since General Electric's (GE) $32 billion takeover of Baker Hughes (BHGE) in October 2016, according to research firm Dealogic.

Soaring oil prices -- crude has climbed above $68 a barrel for the first time in nearly four years -- has accelerated US shale oil production, giving refiners access to more supply.

Related: Why Exxon isn't enjoying America's big oil party

The Andeavor acquisition not only shows confidence in the oil price rally, but represents a bet on the US shale oil boom. Andeavor owns two refining plants located near the Permian Basin, the shale hotbed in West Texas and New Mexico that is pumping more and more oil.

One of the other catalysts for the deal: a 2020 rule change that will prevent ships from burning dirty fuel oil. The switch should boost demand for cleaner fuels that US refiners are able to produce.

"US refiners are the most sophisticated in the world so they will be well-positioned for the shift in demand," said ClipperData's Smith.

If approved by regulators and shareholders, the deal will allow Marathon to expand its refining footprint, which is focused in the Gulf Coast and the Midwest. Andeavor, by contrast, owns multiple refineries in California and the Pacific Northwest.

"Despite the size... we do not foresee any regulatory problems given the disparate geographical markets of each company," Matthew Blair, an analyst at energy investment bank Tudor, Pickering, Holt & Co., wrote to clients.

Marathon and Andeavor said the transaction is expected to close by the end of the year.

The sale marks a huge win for Goff, a former ConocoPhillips exec who took over as Andeavor's CEO in May 2010 when the stock fetched less than $14. Now, Marathon has agreed to purchase the company for $152.27 a share, a 24% premium to Friday's closing price.

The deal "closes out an epic run for Goff" and represents an "unqualified success for management," Blair wrote.