Kellogg Co agreed to swallow 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 level 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 like Special K and Rice Krispies.

P&G had agreed to sell Pringles to Diamond Foods last year, 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.

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

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

Kellogg Chief Executive John Bryant, in an interview with Reuters, 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 is poised to become the world's second-largest savory snack company behind PepsiCo's Frito-Lay.

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.

Plus, Pringles' existing international distribution network could help lift sales of Kellogg's other brands, said Bernstein analyst Alexia Howard.

We believe that Kellogg will be able to generate meaningful revenue synergies, particularly in complementary regions where Pringles is relatively strong but Kellogg is weak, most notably Asia, Howard wrote in a research note.

Pringles is the fourth-largest maker of sweet and savory snacks in the world, behind PepsiCo's Lay's, Doritos and Cheetos, according to Euromonitor International. In the United States, it ranks eighth.

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 said.

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.

Shares of P&G were up only 0.2 percent.

While slightly dilutive to earnings and modestly less attractive to P&G shareholders compared to the original Diamond deal ... it nonetheless improves the company's profile, removing a non-core brand, said Oppenheimer analyst Joseph Altobello.

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 from the deal 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 deal 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 get done this fiscal year ending in June, it would earn about $3.77 per share to $3.93 per share including the one-time gain from the deal.

Kellogg shares were up 5.4 percent at $53.02 in afternoon trading on the New York Stock Exchange after rising as high as $53.35. P&G shares were up 0.2 percent at $64.60. Diamond shares were up 5.8 percent at $23.60 on the Nasdaq.

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