A Houston petrochemical company announced that it has reached a $3.8 billion deal to buy metro Atlanta’s Axiall Corp., capping a months-long takeover battle that was beginning to go international.

Atlanta could end up the loser as a result of Westlake Chemical Corp.'s agreement to buy Axiall, which has a Sandy Springs headquarters with about 200 employees.

Westlake executives said they expect to wring out about $100 million in annual savings from the planned merger by focusing on cost cutting in the combined companies’ administrative, purchasing and marketing functions. Those typically account for many corporate headquarters jobs.

The bulk of Axiall’s 6,000 employees work at plants along the Gulf Coast. The company, which changed its name from Georgia Gulf after a 2013 merger, operates several plants in Louisiana, Mississippi and elsewhere that produce industrial chemicals and building materials such as PVC pipe and vinyl siding.

Westlake, which is controlled by the billionaire Chao family, said the acquisition will create North America’s second-largest PVC manufacturer, and is expected to be completed by year-end. The combined companies will have roughly 10,000 employees and $8 billion revenue.

The $3.8 billion price tag includes the value of Axiall’s debt and other liabilities being assumed by Westlake. Both companies said their boards have approved the transaction.

Axiall’s stock price jumped more than 25 percent Friday after the companies announced the $33-per-share all-cash deal.

In a joint press release with Westlake, Axiall CEO Timothy Mann Jr. said Westlake’s acquisition recognizes “the long-term value of our company.”

But Westlake didn’t clinch the deal until Lotte Chemical Corp., a South Korean conglomerate, disclosed this week that it had offered to buy Axiall. Lotte and Axiall have a joint venture that is building a chemical plant in Louisiana.

The final price is more than triple the roughly $9 level where Axiall’s shares were trading in January, shortly before the company announced that it had rejected a $20 cash-and-stock offer from Westlake as “opportunistic” and inadequate.

Axiall’s rejection ignited a takeover battle in which Westlake tried to remove Axiall’s board through a proxy fight.

As part of Friday’s deal, Westlake agreed to withdraw its slate of replacement directors before Axiall’s June 17 shareholder meeting in New York.