NEW YORK -- Billionaire Warren Buffett is dipping into the ketchup business as part of a $23.3 billion deal to buy H.J. Heinz Co., uniting a legend of American investing with a mainstay of grocery store shelves.

It's the largest deal ever in the food industry and is intended to help Heinz accelerate its transformation into a global business. The company, based in Pittsburgh, also makes Classico pasta sauces, Ore-Ida potatoes and Smart Ones frozen meals.

Buffett's Berkshire Hathaway and its partner on the deal -- 3G Capital, the investment firm that bought Burger King in 2010 -- say Heinz will remain headquartered in Pittsburgh.

Heinz CEO William Johnson said at a news conference that taking the company private would give Heinz the flexibility to make decisions more quickly, without the burden of having to report quarterly earnings.

Heinz was founded by Henry John Heinz and his neighbour L. Clarence Noble in 1869. Their first product was grated horseradish, bottled in a clear glass to showcase its purity. The first ketchup was introduced in 1876; the company says it was the country's first commercial grade ketchup.

Last year, Heinz had sales of $11.6 billion, with ketchup and sauces accounting for just under half of that. Given the saturated North American market, it has increasingly been looking overseas for growth. In 2010, for example, the company bought Foodstar, which makes Master brand soy sauce and fermented bean curd in China. Heinz expects emerging markets to account for a quarter of the company's sales this year.

At a press conference following the announcement, Johnson said the deal got under way eight weeks ago when managing partners from 3G Capital visited him for lunch. The men were familiar with each other because Heinz is a supplier for Burger King.

"We did not solicit this," Johnson noted. "They came to me."

Buffett said on CNBC this morning that 3G's billionaire co-founder Jorge Lemann approached him about the Heinz deal on a plane they were on in early December.

Johnson stressed that Heinz would remain in Pittsburgh, noting that the condition that was part of the deal. He said the only changes the city should see as a result would be that Heinz would no longer be listed in the stock pages of newspapers.

As for management changes, including his own tenure, Johnson said there hadn't yet been any discussions.

Although 3G Capital has a record of aggressively cutting costs at businesses it acquires, managing partner Alex Behring noted at the press conference that Heinz is different because the business is healthy and has been growing its core sales.

Buffett did not immediately respond to a message from The Associated Press on Thursday. But he has recently said that he's been hunting for elephant-sized deals. Buffett said on CNBC that Berkshire had about $47 billion in cash available at the end of last year.

Heinz's brands have power with shoppers that takes years to create and it has been able to raise prices even in the highly competitive grocery business, said Brian Sozzi, chief equities analyst for NBG Productions.

"There isn't going to be another Heinz brand," he said. "It has a durable competitive advantage."

The deal is a departure for Buffett's investment firm, Berkshire Hathaway. Generally, Buffett prefers to buy entire companies and then allow the businesses to continue operating much the way they were before. Berkshire has also helped finance deals before -- most recently during the financial crisis of 2008, when he made lucrative deals for Berkshire when few other companies had cash.

Berkshire's biggest acquisition ever was its $26.3 billion purchase of BNSF railroad in 2010. Before that, it was the $16 billion stock purchase of reinsurance giant General Re in 1998.

Heinz shareholders will receive $72.50 in cash for each share of common stock they own. The transaction value includes the assumption of Heinz's debt. Based on Heinz's number of shares outstanding, the deal is worth $23.3 billion excluding debt.

The per-share price for the deal represents a 20 per cent premium to Heinz's closing price of $60.48 on Wednesday. Heinz said the deal was unanimously approved by its board. Buffett said on CNBC that Berkshire is putting $12 billion to $13 billion into the deal.

"It's our kind of company," Buffett said in the interview, noting its signature ketchup has been around for more than a century. "I've sampled it many times."

The deal is expected to close in the third quarter.

Shares of Heinz were up nearly 20 per cent at $72.45 in afternoon trading Thursday.