Grocery distributor and retailer Spartan Stores Inc. and distributor Nash Finch Co. plan to merge in an all-stock agreement valued at about $1.3 billion, including net debt.

Under the deal, Grand Rapids, Mich.-based Spartan Stores and Minneapolis-based Nash Finch will have 22 distribution centers covering 37 states and 177 retail stores. Combined annual sales are $7.5 billion.

The merger is expected to close by the end of the year.

Private brands involved include Spartan Stores’ Spartan and Nash Finch’s Our Family and Nash Brothers Trading Company.

“This transformational transaction provides a unique opportunity to bring together Spartan Stores’ grocery distribution and retail operations in Michigan, Indiana and Ohio with Nash Finch’s leading position in grocery distribution to military commissaries and exchanges and its complementary wholesale grocery network throughout the U.S.,” Dennis Eidson, president and chief executive officer of Spartan Stores, said in a news release.

The combined company is expected be the largest distributor to military commissaries and exchanges in the U.S.

“This transaction is consistent with our vision to become the largest and most admired food distributor in the U.S.,” Alec Covington, president and chief executive officer of Nash Finch, said in the release.

Under the agreement, Eidson will be president and chief executive officer. Covington will remain in an advisory role.

The combined company will retain a presence in both Minneapolis and Grand Rapids, including members of each management group and staff.

Nash Finch’s military business will remain based in Norfolk, Va. Edward Brunot, president of that business, will continue to lead it. Craig Sturken, board chairman of Spartan Stores, will be chairman of the combined company.

The board will consist of 12 members — seven named by Spartan Stores and five by Nash Finch.

Both boards unanimously approved the agreement. Under its terms, Nash Finch shareholders will receive 1.2 shares of Spartan Stores common stock for each share of Nash Finch common stock they own. At closing, Spartan Stores shareholders will own about 57.7% of equity and Nash Finch shareholders 42.3%.

The merger is subject to regulatory approvals and conditions that include the approval of Spartan Stores and Nash Finch shareholders.

The combined company is expected to save about $50 million annually by the third fiscal year of operations due mainly to consolidation of corporate functions, procurement and other operating efficiencies.

“The scale of the combined company will provide efficiencies and savings in purchasing and strengthen our ability to serve our independent retail customers, military commissaries and exchanges and retail consumers,” Eidson said in the release.