Grocery store chain Albertsons announced Tuesday that it will purchase the remainder of independent Rite Aid stores, with the supermarket chain rebranding its own pharmacies as Rite Aid.

The deal, which will create a company worth a reported $24 billion and with annual sales potential of $83 billion, comes during a shakeup in the the world of traditional retail sales, which includes grocery and drugstore sales.

“Our combination with Rite Aid will enable us to even better serve the valuable pharmacy customer by providing a fully integrated one-stop-shop for our customers’ food, health, and wellness needs,” Bob Miller, Albertsons Companies chairman and chief executive officer, said in a press release.

Miller told the Wall Street Journal on Tuesday the merger was a way for Albertsons and Rite Aid to stay competitive against large retailers such as Walmart and online giant Amazon.

Drug stores getting a big shake up

Over the past few months, drugstore chains have been at the center of a number of big mergers and acquisitions, as different segments of the traditional retail industry struggle to redefine themselves.

In September 2017, Rite Aid sold nearly half of its 4,000 stores to Walgreens, in a deal worth $4.4 billion, according to reports. Walgreens initially proposed buying all of Rite Aid, but was blocked by regulators.

And in a move that analysts said shows how the healthcare industry is being reshaped, drugstore chain CVS announced a $70 billion deal to purchase health insurance company Aetna in December. Aetna and CVS say they’ll be able to offer low-cost care through the chain’s many locations, via apps and the phone, according to reports.

CVS and Aetna were also said by some analysts to be acting defensively, as the healthcare market gets more competitive and new entrants make a play for products and services. Amazon, for example, is said to be in talks about entering the pharmacy business.

Amazon, which is in a pitched battle with Walmart for online and grocery sales, announced in June that it would buy Whole Foods. The grocery industry as a whole is worth $800 billion and the drug industry is worth about $450 billion in the U.S., according to Bloomberg.

The healthcare market in transition

The drugstore mergers come at a time when companies and consumers are struggling to contain healthcare costs. Some market uncertainty stems from the tax overhaul, passed by Congress in December, which eliminates something called the individual mandate, a key part of Affordable Care Act, known as Obamacare. The mandate had required consumers to purchase health care or pay a tax penalty. Without that source of revenue, health care premiums could become more expensive, according to experts.

The drugstore mergers come at a time when companies and consumers are struggling to contain healthcare costs.

With those things in mind, In late January, Amazon, Berkshire Hathaway, and JPMorgan Chase announced they would pool resources to create a health care savings consortium for their 1.5 million employees.

The executives of those companies offered few details about the project, which they said is in its early stages, but they said in a press release the companies would focus “on technology solutions that will provide [their] U.S. employees and their families with simplified, high-quality and transparent health care at a reasonable cost,” as well as creating a solution “free from profit-making incentives”.

Albertsons finds a way to go public

Albertsons is owned by the private equity group Cerberus Capital, which purchased the grocery store chain in 2013 for $3.3 billion.

Cerberus had tried to bring Albertson’s public in 2015, but was unsuccessful. By purchasing Rite Aid, which is public, the private equity fund will be able to merge the grocery store chain with a company that is already public. It will do that by exchanging shares of Rite Aid Stock for Albertsons stock.

Good to know: a private equity fund pools money from wealthy individuals and other investors to purchase mature companies, usually with the intention of boosting sales and profits and then selling them at a profit. By bringing Albertson’s public through a combination with Rite Aid, Cerberus will achieve that goal by selling a portion of the company to the public.

Following the merger, which must first be approved by regulators, Albertsons and Rite Aid will have approximately 4,900 locations and 4,350 pharmacy counters, as well as 320 clinics across 38 states and Washington, D.C. They will also serve 40 million customers per week, Albertson’s said in a press release.  The combined company will be renamed following approval of the deal, Albertsons said.

News of the merger sent Rite Aid stock up 2% to $2.17 a share in early afternoon trading on Tuesday.*

Fast facts: Albertsons

  • Albertsons also owns Safeway stores, Vons, Jewel-Osco, Shaw’s, Acme, Tom Thumb, Randalls, United Supermarkets, Pavilions, Star Market, Haggen and Carrs, and the meal kit company Plated.

Fast Facts: Rite Aid

  • Rite Aid is one of the nation’s largest drugstore chains with fiscal 2017 revenue of $32.8 billion.
  • Current Rite Aid Chairman and CEO John Standley will become the chief executive of the combined company, according to the press release.