Philip Morris Cos. Inc., the giant cigarette manufacturer, said yesterday it has agreed to acquire General Foods Corp. for more than $5.6 billion in a merger that would create the nation's biggest consumer products company.

The transaction, which is expected to be approved by directors of both companies on Monday, would be the biggest merger ever outside the oil industry, surpassing General Motors Corp.'s pending $5 billion acquisition of Hughes Aircraft Co.

With combined sales in excess of $23 billion, more than 110,000 employes and well known brand-name products ranging from Philip Morris' Marlboro cigarettes to General Foods' Maxwell House coffee, the new company would be about twice as big as Procter & Gamble Co.

The proposed merger is the second this year involving a domestic tobacco company that decided to invest billions of dollars in the food industry, which has better prospects for growth and profitability than the cigarette business. Earlier, R. J. Reynolds Industries Inc. acquired Nabisco Brands Inc. for about $4.9 billion.

Under terms of the merger agreement signed yesterday, Philip Morris will pay $120 a share in cash for General Foods, a stock that has traded as low as $53 a share in the last year. While analysts said yesterday that the price was on the high side, General Foods stockholders were delighted.

"They made us a lot of money," said Warren Buffett, chairman of Omaha-based Berkshire Hathaway Inc., General Foods' biggest stockholder with about 8 percent of the company. "It is a tough thing from General Foods' management's point of view when you have a company on the track and doing well, but they saw it was an attractive offer, and I think they worked to maximize that offer. I tip my hat to both of them."

Buffett, who said yesterday he began acquiring General Foods shares about four years ago because "we liked the brand names, the management and the stock price," paid less than $40 a share for his stock. With more than 4 million General Foods shares in his portfolio, Buffett's pretax profit on the deal would be more than $300 million.

Philip Morris Chairman Hamish Maxwell said yesterday that General Foods would keep its headquarters in Rye Brook, N.Y., and operate as a separate company. He plans to offer five seats on the Philip Morris board to General Foods directors, including the company's chairman, James L. Ferguson, who is expected to become vice chairman of Philip Morris.

"We intend to maintain General Foods as a separate and distinct company, and General Foods' present management will continue to operate its business," Maxwell said.

"It is planned to keep General Foods intact and not divest any of its operations following the merger. On the contrary," he said, "we intend to provide support to enable General Foods to build on its many strong franchises and to expand its activities in other promising and growing grocery categories."

"We will operate as an autonomous company, and we remain committed to being the premier food and beverage company in the world," General Foods Chairman Ferguson said.

General Foods, which had sales of about $9 billion and net income of $324.9 million last year, markets more than 60 brand names in over 100 countries. Those brand names include Sanka, Brim and Yuban coffees, Kool-Aid and Tang drink mixes, Jello-Brand Gelatin desserts, Birds Eye frozen vegetables and fruits, Post Cereals and Oscar Mayer meats.

Philip Morris is best know for Marlboro, the top-selling cigarette in the world. The company also markets Benson & Hedges, Merit, Virginia Slims and Parliament Lights. Outside the cigarette business, which accounts for most of the company's revenue, Philip Morris is a major force in the beverage business, with beers including Miller, Lowenbrau and Meister Brau, and soft drinks including 7Up. Philip Morris had revenue of about $13.8 billion and net income of $888.5 million last year.

"I think in the case of both Philip Morris and R. J. Reynolds, they see the handwriting on the wall," said William G. Staton, research director at Interstate Securities. "Nobody sees any growth in the tobacco business, but the business continues to throw off a lot of cash. They cannot redeploy that cash in the cigarette business."

"If you're a General Foods shareholder, you've got to be delighted," said Ronald Strauss, an analyst with William Blair. "It is a real full price. For Philip Morris, I think the deal is a function of cigarette product liability suits, excess cash and the fact that the cigarette business isn't going anywhere. The consumer is shunning cigarettes in the United States. Also, the skill in marketing cigarettes is close to the skill required to market food products in the grocery store, so it makes pretty good sense."

In a move designed to ensure completion of the friendly merger, General Foods has granted Philip Morris a separate option to acquire about 18 percent of its stock for $120 a share. The tender offer by Philip Morris for General Foods' publicly held shares will begin Monday and expire on Oct. 28.

General Foods stock climbed more than 35 points this week, including about an 8-point rise to 118 during trading through Jefferies Group Inc. yesterday while the New York Stock Exchange was closed. Analysts do not expect rival bidders to top the Philip Morris offer.