(Adds details, Walgreens results; updates shares)
June 29 (Reuters) - Drugstore chain Walgreens Boots Alliance Inc terminated its deal to buy Rite Aid Corp after struggling to win antitrust approval, and said it would instead buy nearly half of the smaller rival's U.S. stores for $5.18 billion in cash.
Walgreens also said on Thursday it ended a related deal to sell 865 Rite Aid stores to Fred's Inc, sending Fred's shares down 27 percent in premarket trading.
Rite Aid's shares plunged 17 percent to $3.24, while Walgreens shares were up 4.4 percent at $80.51.
Walgreens offered to buy Rite Aid for $9.5 billion in October 2015, but struggled to gain approval as regulators worried that a merger between the No. 1 and No. 3 drug chains in
the United States would stymie competition. 1/8http://reut.rs/2kFULFa
"We believe this new transaction addresses competitive concerns previously raised with respect to the prior transaction," Walgreens Chief Executive Stefano Pessina said in a statement.
Walgreens said it expects the initial closing of the deal within six months, after which it will begin buying the 2,186 Rite Aid stores and convert them to Walgreens.
Walgreens also reported better-than-expected profit and sales for the third quarter, helped by a rise in prescription volumes in its pharmacy business in the United States.
The company also authorized a $5 billion buyback program and raised the bottom end of its full-year profit forecast by 8 cents per share to a range of $4.98 to $5.08.
Analysts on average were expecting full-year profit of $4.96 per share, according to Thomson Reuters I/B/E/S.
Rite Aid, which had nearly 4,600 stores in the United States as of May, said the stores included in the deal are primarily located in the Northeast, Mid-Atlantic and Southeast.
The deal also consists of three distribution centers located in Connecticut, Philadelphia and South Carolina.
Rite Aid will provide certain transition services to Walgreens for up to three years after the deal closes.
The new deal is expected to modestly add to adjusted earnings per share in the first full year after close and generate savings of more than $400 million, Walgreens said.
The company said it would pay Rite Aid a $325 million termination fee.
(Reporting by Siddharth Cavale in Bengaluru; Editing by Sriraj Kalluvila)