Walgreens Boots Alliance Inc. (NASDAQ: WBA) agreed to acquire Rite Aid Corp. (NYSE: RAD) for about $9.4 billion in cash in a transaction to further expand the company’s role in the distribution of medications in the U.S.

The Rite Aid transaction, announced Tuesday, would combine the second- and third-largest drugstore chains in the U.S., with a total of about 12,800 locations, helping Walgreens vault past market leader CVS Health Corp. The acquisition will add to Walgreens’ earnings beginning a full year after completion and will produce more than $1 billion in savings from cost overlaps, the companies said Tuesday in a statement. Including debt, the deal is valued at $17.2 billion, they said.

Subscribe Now

Complete access to real-time information and analysis of news and trends in the industry.

14-Day Free Trial

No credit card required. Complete access to articles, breaking news and industry data.