Walmart announced Monday that it is buying Sam’s Clubs chain, a chain with more than 500 pharmacies, for $2.5 billion.
The deal comes as Wal-Mart is facing competition from Kroger Co. and CVS Caremark.
Sam’s Clubs operates pharmacies in 34 states.
The pharmacy chain has been struggling as it tries to build its own pharmacy network, a strategy that has left it with a smaller than expected pharmacy business.
Walmart acquired Sam’s clubs chain for $1.8 billion in 2014 and has since moved aggressively to expand the pharmacy business as it seeks to compete in the health-care market.
Walgreens is also considering acquiring the pharmacy chain’s pharmacy division, according to a person familiar with the matter, a move that would give the pharmacy giant a foothold in the healthcare industry.
The deal would give Walmart a foothold into the pharmacy sector, where it is struggling to gain market share and leverage pharmacy discounts, according the person.
Walmart plans to expand its pharmacy presence through an acquisition of other pharmacy businesses, the person said.
In recent months, Wal-Marts pharmacy business has seen sales decline as consumers turn to cheaper generic drugs, and some retailers have stopped stocking the generic versions of some of the pharmacy brands.
Walmart said it has sold more than 3.5 million of the generics since the start of 2017, and more than 1.4 million of its other brands.
“Walmart is in the process of building a new pharmacy, Sam’s.com, and will continue to build that business with the acquisition of Sam’s, which will be the largest in its history, as we continue to expand in the U.S.,” said the company in a statement.
Bartender Sam Koehn, owner of the Sam’s restaurant in New York, said the deal will give Walmart more options for customers and will be “the most powerful pharmacy acquisition in Walmart’s history.”
Wal-Mart has been under pressure to address pharmacy shortages by trying to acquire and develop new pharmacies.
Last year, Walmart said its pharmacy division was in “disarray” as it struggled to meet demand for generic drugs.
Walmart CEO Doug McMillon said in November that the company would try to expand pharmacy operations, but that it would only do so if it had the right partners and that it was ready to spend $1 billion to acquire other pharmacy companies.
Read more: The acquisition of the chain could further strengthen Wal-mart’s overall business and help it meet future competition from the likes of CVS Health Inc., which has a pharmacy division and is in talks to acquire Rite Aid Inc., Walmart’s biggest rival.