A group of investors led by private equity firm Cerberus Capital Management scored a deal to buy Safeway (NYSELSWY) for about $9.2 billion, beating out rival grocery store chain Kroger (KR).

Safeway, the No. 2 U.S. grocery store chain, said the deal values the firm at $40 a share, compared to Thursday's closing price of $39.47 a share or $23.27 a share one year ago.

The acquisition would add to Cerberus’s portfolio of grocery stores, which already includes No. 5 chain Albertsons.

In a statement Thursday evening, Albertsons' Chief Executive Officer Bob Miller said, "This transaction offers us the opportunity to better serve customers by adapting more quickly to evolving shopping preferences in diverse regions across the country. It also brings together two great organizations with talented management teams."

Digging into the terms of the deal, Cerberus will pay $32.50 a share in cash, plus other contingent consideration with an estimated value of $3.65 a share. Safeway won't alter it's plans to distribute the remaining 37.8 million shares of Blackhawk stock to shareholders in mid-April at the current value of $3.95 per share.

Rival grocer Kroger, the No. 1 U.S. chain, was also reportedly considering making a play for Pleasanton, Calif.-based Safeway, which has around 138,000 employees. Last year, Cerberus agreed to a $3.3 billion deal to acquire five grocery brands from Supervalu (SVU), including the Albertsons stores it didn’t already own.

Safeway revealed it was in buyout talks last month, saying it was in “ongoing” conversations with unspecified suitors.

After touching a 52-week intraday high of $40.25, shares of Safeway closed off 0.03% on Thursday at $39.47. That leaves the grocery store up more than 21% so far in 2014. 

Follow Matt Egan on Twitter @MattMEgan5