Albertsons Companies and Rite Aid Corporation have walked away from a previously announced merger agreement, Rite Aid announced late Wednesday.

The $24 billion merger, which was announced in February, would have created a new company with more than $80 billion in annual sales across 4,900 U.S. locations.

"While we believed in the merits of the combination with Albertsons, we have heard the views expressed by our stockholders and are committed to moving forward and executing our strategic plan as a standalone company," Rite Aid chairman and CEO John Standley said in a statement. " "We remain focused on leveraging our network of conveniently located retail pharmacies, our EnvisionRxOptions PBM and our trusted brand of health and wellness offerings. We will continue building momentum for key areas of our business like our innovative Wellness store format, highly successful customer loyalty program and expanded pharmacy service offerings, as we also enhance our omni-channel and own brand offerings to strengthen our competitive position and create long-term value for stockholders."

Albertsons said it was unwilling to renegotiate the terms of the deal. The company, in a Wednesday evening statement, said "after careful consideration of all information available to our board of directors through today, we were unwilling to change the terms of the merger."