MINNEAPOLIS — Food distributor Spartan Stores Inc. is buying Nash Finch Co., a major grocery distributor to military commissaries, in an all-stock deal valued at approximately $312 million in a move that will expand its distribution area.

Spartan has grocery distribution and retail operations in Michigan, Indiana and Ohio while Nash Finch's military commissaries distribution activities are supported by a complementary wholesale grocery network throughout the U.S.

Spartan President and CEO Dennis Eidson said the deal "provides a unique opportunity" to combine the two networks.

Shares of both companies surged on the news.

The combined company will include 22 distribution centers that cover 37 states and 177 retail stores. It will keep operations in both Minneapolis and Grand Rapids, Mich. Nash Finch's military business will continue to be based in Norfolk, Va.

The company's private brands will include Spartan's namesake brand as well as Nash Finch's Our Family and Nash Brothers Trading Company brands.

Nash Finch stockholders will receive 1.2 shares of Spartan for each share they own. Spartan shareholders will own about 57.7 percent of the combined company, with Nash Finch stockholders owning the remaining 42.3 percent.

The companies put the value of the transaction at about $1.3 billion, including debt.

Shares of Nash Finch jumped $2, or 8 percent, to $27.43 in premarket trading Monday while Spartan Stores shares rose $1.80, or 8.5 percent, to $23.

Eidson will serve as president and CEO of the combined company. Nash Finch President and CEO Alec Covington will serve as an adviser to help with the transition process. Spartan Chairman Craig Sturken will serve as chairman of the combined company. The board will include seven directors chosen by Spartan and five chosen by Nash Finch.

Annual savings are anticipated to be approximately $50 million by the third full fiscal year of operations. The acquisition is expected to add to adjusted earnings per share within the first full fiscal year.

Both companies unanimously approved the deal, which is targeted to close by year's end. It still needs the approval of Spartan and Nash Finch shareholders.