Kellogg Co agreed to buy Pringles potato chips for $2.7 billion in a cash deal that makes the cereal company second only to PepsiCo Inc

in the global snack food market.

The transaction also marks the final exit of household products maker Procter & Gamble Co

from the food business after its earlier deal to sell Pringles to Diamond Foods Inc fell apart.

The deal was gobbled up on Wall Street. Shares of Kellogg, whose snack brands already include Keebler cookies, Cheez-It crackers and Kashi snack bars, rose as much as 6 percent to their highest since early November, when the company posted disappointing results and cut its 2011 earnings outlook.

Adding Pringles will nearly triple the size of Kellogg's international snack business, pushing snacks to a point where they will account for as much of total revenue as Kellogg's well-known cereal business - the world's largest, with brands such as Special K and Rice Krispies.

Edward Jones analyst Jack Russo said the diversification is good since the cereal business is highly competitive between Kellogg, General Mills Inc and private label brands.

It's a win-win, Russo said. It gets Procter more focused on where they need to be and it's additive to Kellogg's earnings.

Pringles, whose products are sold in over 100 countries, has suffered from being on the block for nearly a year, Russo said. Still, it is a good brand with a strong international distribution network that will likely boost the sales of Kellogg's existing products, he added.

P&G had agreed to sell Pringles to Diamond Foods last April, for $1.5 billion in cash. With $850 million of debt, the enterprise value was $2.35 billion on that deal, which was structured in a way that let P&G save on a hefty capital gains tax.

But that deal became no longer feasible, according to P&G Chief Executive Bob McDonald, following the discovery of improper accounting at Diamond that led the snacks company to replace its chief executive and finance chief. The U.S. government is looking into Diamond's accounting practices.

The new deal, worth $2.7 billion, is structured differently. On a conference call, Credit Suisse analyst Robert Moskow estimated that there could be $490 million of tax benefits for Kellogg, which means it is paying closer to $2.2 billion.

Even though the new deal is modestly less attractive than the Diamond deal, Oppenheimer analyst Joseph Altobello said it improves P&G's profile since it removes a non-core brand.

Diamond said on Wednesday that it does not have to pay any break-up fee on the aborted Pringles deal and its shares rose more than 5 percent.

MORE DEALS IN STORE?

With Diamond's future unknown, some analysts have begun to assess the attractiveness of its snack food brands, Kettle potato chips and Pop Secret popcorn, to another buyer.

In an interview with Reuters, Kellogg Chief Executive John Bryant declined to comment on his company's interest in Diamond or any of its brands.

He did admit, however, that Diamond's brands made more strategic sense to Kellogg now that it is poised to become the world's second-largest savory snack company behind PepsiCo's Frito-Lay, which owns four out of the top five snack brands in the world: Lay's, Doritos, Cheetos and Ruffles.

They're clearly a fit in the portfolio. You could say our ability to do bolt-on acquisitions has probably expanded with the addition of this business, Bryant said.

Pringles is the fourth-largest brand of snacks in the world, with 2.3 percent of the market, according to Euromonitor International. In the United States, it ranks eighth with 2.5 percent.

The companies expect the deal to close by this summer. Both companies declined to say when their discussions started.

But when an analyst asked Kellogg's Bryant why his company did not buy Pringles when it was up for sale last year, he said it was hard to compete with the Diamond offer.

Also, Kellogg is now more interested in growing its international snack business than it had been, he added.

While Pringles was a revenue-driver for P&G, bringing in about $1.5 billion a year in sales, it was the company's only remaining food business and no longer fit in with P&G's focus on items such as beauty and personal care products.

In recent years, P&G also sold off its Folgers coffee business and Jif peanut butter.

In contrast, Pringles will be center plate for Kellogg, Bryant said, meaning that Kellogg could put more focus on Pringles than P&G had.

P&G said the deal would lead to an after-tax gain of $1.4 billion to $1.5 billion, or 47 to 50 cents per share, about the same amount it estimated when it first announced the agreement with Diamond in April 2011.

About 1,700 P&G employees will move to Kellogg.

Kellogg will borrow $2 billion to complete the deal and expects to limit its share repurchase program for about two years. Excluding one-time costs and the impact of reduced buybacks, the deal will add 8 to 10 cents per share to Kellogg's earnings in 2012 and 22 to 25 cents in 2013, Kellogg said.

Including those items, the deal will lower Kellogg's earnings per share in 2012 by 11 to 16 cents.

P&G said that, should the deal be completed this fiscal year ending in June, it would earn about $3.77 to $3.93 per share, including the one-time gain from the deal.

Kellogg shares closed up 5.1 percent at $52.87 on the New York Stock Exchange after rising as high as $53.35. P&G shares closed up 0.1 percent at $64.55. Diamond shares closed up 5.2 percent at $23.46 on the Nasdaq.

Barclays Capital was Kellogg's financial advisor, while Morgan Stanley advised Procter & Gamble.

(Reporting by Jessica Wohl in Cincinnati, Martinne Geller and Phil Wahba in New York; Editing by Gerald E. McCormick, Dave Zimmerman and Andre Grenon)