U.S. oil refiner Tesoro said on Thursday it would buy Western Refining for $4.1 billion to add refineries in Texas, New Mexico, and Minnesota.

The combined company will have refining capacity of over 1.1 million barrels per day. Tesoro has refineries in California, Washington, Alaska, Utah, and North Dakota.

“The acquisition of Western further strengthens our integrated business model and extends our portfolio into attractive and growing markets,” said Tesoro chief executive Greg Goff, who will lead the combined company.

U.S. refiners are in the midst of their worst year since the shale boom began in 2011. High fuel inventories have punished margins this year, forcing some refiners to voluntarily cut production, delay capital work, lay off workers, and slash employee benefits.

Western Refining shareholders will get 0.4350 Tesoro shares for each share they own, or $37.30 in cash. The offer is a 22.3 percent premium to Western Refining’s Wednesday’s close.

The total deal is valued at about $6.4 billion, including about $1.7 billion of Western Refining’s debt and $605 million for a non-controlling interest in Western Refining Logistics LP.

The combination of the two refiners will create $350 million to $425 million in synergies, which are expected to be realized within the first two years, the companies said.

 

The combined company will have over 3,000 branded retail stations. Tesoro said the deal will increase its earnings by 10 percent to 13 percent per share in 2018.

The deal is expected to close in the first half of 2017.

Tesoro also said it has increased its share buyback program by $1 billion to over $2 billion.

Goldman, Sachs advising Tesoro and some of its affiliates are providing committed financing. Sullivan & Cromwell LLP is Tesoro‘s legal adviser. Barclays is Western Refining’s adviser and Davis Polk & Wardwell LLP is its legal adviser.