Albertsons is the latest retailer to seek a chunk of Rite Aid.
The grocery giant plans to purchase the part of Rite Aid that isn’t being sold to Walgreens Boots Alliance, according to a report from The Wall Street Journal.
In 2015, Walgreens wanted to acquire all of Rite Aid. But after the deal failed to gain regulatory approval, Walgreens scrapped the plan and decided to buy part of Rite Aid—some 2,000 stores—instead.
More from FORTUNE
Read: Walgreens to Shutter Almost 600 Rite Aid Stores as Part of Megadeal
Now Albertsons is stepping in to buy the rest of the drugstore chain.
The proposed cash-and-stock deal will reportedly give Albertsons investors 71% of the combined company. The rest will be owned by Rite Aid investors. The combined company will be worth approximately $24 billion. And with Rite Aid under its umbrella, Albertsons will have $83 billion in revenue.
The deal will allow Albertsons to go public, the WSJ reports, but—perhaps more importantly—it will also make the company more competitive in an increasingly crowded space, allowing it to expand its food and e-commerce offerings.
Read: Here’s How Amazon Prime’s New Whole Foods Delivery Will Work
Chief executives of both companies told WSJ that the merger is “the best way for them to compete in businesses increasingly threatened by Amazon.com Inc., along with an emboldened Walmart.” Amazon and Walmart have increasingly encroached on space previously held by the likes of Rite Aid, Walgreens, and Albertsons subsidiaries.
Similar to the Walgreens deal, the federal government will need to approve Albertsons’ Rite Aid plans. However, the two companies hope that their limited sector overlap will allow the deal to go forward.