Only months after Rite Aid's (RAD 25.00%) planned merger with Walgreens Boots Alliance (WBA 0.17%) fell apart, the two companies have successfully convinced regulators to OK a smaller deal in which Walgreens will acquire 1,932 stores and three distribution centers for $4.375 billion in cash.

The agreement puts Walgreens in a better position to compete with the nation's biggest retail pharmacy chain, CVS Health (CVS 0.74%), and it gives Rite Aid much-needed cash that it can use to repair its balance sheet and revamp its remaining business.

A pharmacist inventories shelves at a retail store.

Image source: Getty Images.

The details of the deal

In 2015, Walgreens was planning to acquire Rite Aid lock-stock-and-barrel for $9.4 billion plus debt, however, a regulatory concern that this deal would concentrate too much market share led to Walgreens and Rite Aid proposing a smaller merger that jettisoned 1,200 stores to Freds.

Unfortunately, that deal didn't pass muster with the Federal Trade Commission (FTC) either so days before the FTC was slated to issue a formal go/no-go decision on the proposal, Walgreens and Rite Aid officially scuttled their merger plans.

Instead, the two companies agreed to yet another deal in which Walgreens would acquire 2,186 Rite Aid stores and three distribution centers for $5.2 billion in cash. Rite Aid also secured an option to piggy-back on Walgreens buying power for generic drugs, a sweetener that could improve the back-of-store margin at Rite Aid's remaining stores.

Today, the two companies announced that after making concessions that further reduced the size of their transaction, they've secured a regulatory OK. Walgreens will begin taking over Rite Aid stores next month and the deal should be completed in early 2018.

What it means for investors

Walgreens is a pharmacy retail Goliath with 13,200 stores globally and acquiring Rite Aid's stores puts it in even better position to negotiate with drugmakers and drug distributors for lower prices. Walgreens estimates that by leveraging its existing infrastructure across newly acquired Rite Aid stores it will be able to reap $300 million in annual savings within four years.

Over at Rite Aid, a shrinking retail store footprint means the company's going to generate much less in annual sales and EBITDA, but the influx of cash should transform it into a much more profitable company. The company plans to use proceeds from the sale to pay off a mountain of debt accumulated over the past decade due to its own acquisitions. Until now, this debt has been a millstone around the company's neck because of annual interest expenses totaling more than $100 million per quarter.

RAD Total Long Term Debt (Annual) Chart

RAD Total Long Term Debt (Annual) data by YCharts

In July, Rite Aid was estimating $4.9 billion in net proceeds from its original plan to sell 2,186 stores and $96 million in corporate administrative cost savings post-sale. After paying down debt, Rite Aid forecast interest expense would drop to $140 million per year from over $430 million. Management also said pro forma net income last year would have been $93 million instead of the $4 million reported, and that average annual revenue at its remaining stores would improve to $6.1 million from $5.7 million pre-transaction.

Obviously, those figures will change somewhat because Rite Aid is selling fewer stores to Walgreens, however, the figures still offer insight into how financially healthy Rite Aid will be after this deal is done.

What's next

Rite Aid's CEO recently resigned and that clears the way for a fresh set of eyes to steer Rite Aid's transformation. Greater financial flexibility due to paying down debt should give it an opportunity to invest more money in its pharmacy benefits manager, EnvisionRx, store remodels, and healthcare clinics. EnvisionRx is growing more quickly than its retail store business and it will represent a larger proportion of Rite Aid's sales once this deal is complete, so Rite Aid's future looks to be brightening.

Meanwhile, Walgreens' experience integrating mergers and acquisitions has me thinking that a phased-in approach to rebranding Rite Aid stores should go off without much of a hitch. Overall, it may be a bit before merger synergies provide earnings tailwinds, but I think this acquisition is a win for Walgreens too.