(Reuters) - Snack food company B&G Foods Inc (>> B&G Foods, Inc.) said it would buy General Mills Inc's (>> General Mills, Inc.) Green Giant frozen foods and Le Sueur canned vegetables brands for about $765 million to expand its distribution network and enter the frozen foods market.

Shares of B&G, which expects the deal to add to earnings immediately, rose as much as 14 percent to a 14-month high on Thursday.

Growth in the frozen vegetables category has been sluggish in recent years as consumers shift to fresher items. This has led to companies scaling back marketing spend on frozen foods.

B&G plans to double the amount General Mills has been spending on marketing the Green Giant brand, B&G Chief Executive Robert Cantwell said on a conference call.

"In General Mills, Green Giant was an important brand, but they had a different direction...It makes more sense under B&G's ownership and we're going to pay a lot more attention to it," Cantwell said.

Green Giant, with a portfolio of more than 160 products, is the second-biggest frozen foods brand by market share in the United States and the largest in Canada.

B&G, which sells Vermont Maid syrups, Pirate's Booty popcorn and Cream of Wheat breakfast porridge mixes, said it expected the acquired businesses to generate annual sales of about $550 million and add 60 cents per share to its profit.

The two brands had net sales of about $585 million in fiscal 2015, General Mills said.

General Mills, like other big packaged food companies, has been looking to shed less-profitable brands to cut costs and focus on faster-growing brands.

Reuters reported last week that General Mills was in late-stage talks with B&G to sell Green Giant, whose mascot is the Jolly Green Giant.

The sale raises the question of whether General Mills might be considering more extensive portfolio changes to reduce exposure to older legacy brands, Sanford Bernstein Alexia Howard wrote in a note.

General Mills said it would continue to operate the Green Giant business in Europe and select other markets under license from B&G.

B&G shares were up 12.6 percent at $34.29 in afternoon trading on the New York Stock Exchange, while General Mills' shares were up 1.3 percent at $57.55.

Barclays and RBC Capital Markets are B&G's financial advisers for the deal, while Rothschild advised General Mills.

(Reporting by Ramkumar Iyer in Bengaluru; Editing by Savio D'Souza and Kirti Pandey)

By Ramkumar Iyer

Stocks treated in this article : General Mills, Inc., B&G Foods, Inc.