PARSIPPANY, N.J. — B&G Foods, Inc. acquired Pirate Brands in 2013 for $195 million. Five years later, the company sold it to the Hershey Co. for $420 million.

“Pirate’s Booty was an exciting brand for us, growing approximately $12 million in net sales since our acquisition in 2013,” said Robert C. Cantwell, president and chief executive officer of B&G Foods. “However, Pirate’s Booty was not the only growing brand in our portfolio.”

 During an Oct. 30 earnings call, Mr. Cantwell shed light on the sale of what he called “one of the best warehouse snack brands in North America.”

“Internally, we certainly love Pirate’s Booty,” he said. “We think it’s a great brand, and certainly, it was not a brand we had put up on the market. So, we weren’t actively trying to sell it.”

At the time of the acquisition, B&G Foods had planned to puff up its snacking portfolio with additional brands, but that strategy did not pan out. More recently, Mr. Cantwell said, the company has discovered “it was time to move on from snacks” with a longer-term focus on frozen vegetables and center-store grocery brands.

The divestiture of Pirate Brands “honestly alleviates a lot of pain and just cumbersome distribution network, etc., because it was really the only real salty snack brand we have in our portfolio,” Mr. Cantwell said. “Back to Nature is a cookie-cracker business. New York Style is a bagel chip business. It’s sold in a deli. It is much more center-of-the-store oriented. But we really didn’t have another snack business, and we really weren’t able to acquire one in the last five years. So, it was time to move on. I think we can focus now.”

In the third quarter ended Sept. 29, B&G Foods’ net income was $31,988,000, equal to 49c per share on the common stock, down from $32,730,000, or 49c, in the prior-year period. Net sales rose 4.1% to $422,602,000 from $406,051,000.

“Our third-quarter results benefited from continued top-line growth, strong margins, strong cash flow generation and increased earnings per share despite a challenging operating environment for food companies,” said Bruce C. Wacha, chief financial officer. “The increase in net sales was driven by both net pricing and volume. Net pricing, which benefited from both our list price increases as well as improvements in our trade spending, contributed $5.2 million to net sales growth. Increased volumes, which included the benefit of acquisitions, contributed $11.3 million to net sales growth. Our base business net sales, which has now been adjusted to exclude Pirate Brands, was essentially flat or down less than $1 million for the quarter.”

B&G Foods said it intends to use the proceeds from the sale together with additional borrowings under its revolving credit facility to repay the entire $500.1 million principal amount of tranche B term loans outstanding under its credit facility and to pay taxes, fees and expenses related to the sale of the Pirate Brands business.

“Our previous full-year guidance has assumed that Pirate Brands would generate approximately $20 million to $25 million in net sales and $6 million to $7 million in adjusted EBITDA in this year’s fourth quarter for a full year adjusted EBITDA of approximately $26 million,” Mr. Wacha said. “We expect the repayment of our term loan with sale of approximately $3.5 million of interest expense during the fourth quarter. We are updating our guidance for 2018 for the expected impact of the sale of Pirate Brands and our recent repayment of long-term debt. We expect full year 2018 net sales of $1.705 billion to $1.72 billion, adjusted EBITDA of $338 million to $343 million and adjusted diluted earnings per share of $1.98 to $2.05.”