United Natural Foods Inc. agreed to buy Supervalu Inc. for about $2.9 billion, in the latest consolidation in the grocery industry.

The distributor of natural and organic foods to Whole Foods Market and other grocery chains will pay $32.50 a share in cash for Supervalu, according to a joint statement. The per-share price represents a 67 percent premium to Supervalu’s closing price of $19.45 on Wednesday. The deal includes the assumption of debt.

Shares of United Natural Foods fell as much as 17 percent in New York Thursday, a sign investors may see the deal as pricey. Supervalu shares surged as much as 65 percent to $32.17 in New York.

Supervalu is mainly a grocery wholesaler, providing products to more than 1,800 stores. The company also operates almost 200 locations after selling most of its brick-and-mortar operations in recent years. Bloomberg reported in April that the company was working with an adviser to consider options including a potential sale.

United Natural Foods plans to finance much of the transaction with debt, and said Goldman Sachs Group Inc. provided committed financing in the transaction. Over time, the company plans to divest Supervalu retail assets, according to the statement.

“The multiple paid is consistent with recent transactions in the grocery space,” RBC Capital Markets analyst William Kirk said in a note.

Goldman Sachs and Foros served as financial advisers to United Natural Foods, while Skadden, Arps, Slate, Meagher & Flom LLP and Jones Day LLP were legal counsel. Barclays Plc and Lazard Ltd. advised Supervalu and Wachtell Lipton Rosen & Katz LLP served as legal counsel.