Warren Buffett’s Berkshire Hathaway Inc. and Jorge Paulo Lemann’s 3G Capital agreed to buy HJ Heinz Co. for about $23 billion, ending the independence of an iconic ketchup maker that traces its roots to the 1860s.

The buyers will pay $72.50 a share, compared with yesterday’s closing price of $60.48, according to a statement today. Berkshire will spend about $12 billion to $13 billion on the deal for the maker of condiments and Ore-Ida potato snacks. The transaction is valued at about $28 billion including the assumption of debt, according to the statement.