Petroleum products refiner Tesoro (TSO) said Thursday it agreed to acquire its competitor Western Refining (WNR) , giving the buyer a stronger foothold in its home state of Texas. 

San Antonio, Texas-based Tesoro will pick up Western Refining in an all-stock transaction valued at $6.4 billion, including debt. Western Refining shareholders have the option to elect cash in lieu of stock up to a cap of 10% of the equity consideration. 

Western Refining shareholders can elect to receive 0.4350 a share of Tesoro for each share of El Paso, Texas-based Western Refining stock they own, or $37.30 in cash per share of Western stock.

Elections to receive cash will be capped at 10.8 million shares, worth about $404 million, after which they will be subject to proration.

Tesoro said the stock offer implies a value of $37.30 per share, representing a premium of 22.3% to Western Refining's stock price of $30.50 as of Wednesday's close. Tesoro's closing stock price of $85.74 on Wednesday implies an equity value for the deal of $4.1 billion.

The buyer will pick up $1.7 billion of Western Refining's debt and the $605 million market value of the target's non-controlling interest in Western Refining Logistics (WNRL) , giving the deal a total value of $6.4 billion. 

The companies promised in a joint statement to deliver between $350 million and $425 million in annual synergies through the deal and expect to achieve 10% to 13% earnings per share accretion by 2018, the first full year of combined operations. 

Tesoro and Western Refining reasoned that the deal would expand the refiners' opportunities for logistics growth in crude oil production basins and product regions, particularly in West Texas' lucrative Permian Basin. 

The deal continues a wave of consolidation among independent refiners in 2016, including Tesoro, which most recently acquired Madison, Wis.-based renewable fuels and chemicals company Virint and the 20,000 barrel-per-day Dakota Prairie, N.D. refinery from Calumet Specialty Productions Partners (CLMT) and MDU Resources (MDU) , both for undisclosed sums. 

It also comes as Western Refining wrapped up its own wave of deals this year. The company scooped up logistics assets from St. Paul Park Refining for $210 million in September and completed the merger of the remaining 62% of Northern Tier Energy (NTI) and its 92,000 barrel-per-day refinery in St. Paul Park, Minn., for $1.5 billion.

Refinery consolidation is up in 2016 as U.S. crack spreads -- the difference between the price of crude oil and what products derived from them can fetch --have been down much of this year, allowing buyers and sellers to close the gap on valuations.

Industry followers are patiently waiting on other moves as well. For example, Delek US Holdings (DK) is undergoing a process to require the remaining 48% of peer Alon USA Energy (ALJ) , and Warren Buffett darling Phillips 66 (PSX) has been thought to be eyeing deals, including one for a 71,000 barrel-per-day Whitegate plant in Ireland.

Tesoro and Western Refining expect the deal to close in the first half of 2017 pending shareholder votes and regulatory approval.

Tesoro's shares were down less than 1% in premarket trading Thursday following the announcement, while Western Refining's stock was up just above 1%.

More from Mergers and Acquisitions

Sprint, T-Mobile Might Have to Do More Than Make Promises to Get Deal Approved

Sprint, T-Mobile Might Have to Do More Than Make Promises to Get Deal Approved

Xerox Received Interest From HPQ Before Fuji Deal: Sources

Xerox Received Interest From HPQ Before Fuji Deal: Sources

Divestitures at Newell Expected in Weeks: Wells Fargo

Divestitures at Newell Expected in Weeks: Wells Fargo

In Biopharma M&A, 'Where There's Real Innovation There's Someone Willing to Pay'

In Biopharma M&A, 'Where There's Real Innovation There's Someone Willing to Pay'

AT&T Expert Calls DOJ's Model 'Theoretically Unsound'

AT&T Expert Calls DOJ's Model 'Theoretically Unsound'