The consumer goods giant Kraft Heinz is calling off its plans to merge with Unilever – the maker of Hellmann’s mayonnaise, Ben & Jerry’s ice cream, and Dove toiletries – just two days after confirming its interest in the company.

Kraft, which is backed by the legendary investor Warren Buffett, confirmed that it had made an approach to take over Unilever after the Financial Times Alphavill blog had reported it earlier in the day. Unilever rejected the bid the same day.

“Unilever and Kraft Heinz hereby announce that Kraft Heinz has amicably agreed to withdraw its proposal for a combination of the two companies,” the companies said in a statement on Sunday.

“Unilever and Kraft Heinz hold each other in high regard. Kraft Heinz has the utmost respect for the culture, strategy and leadership of Unilever.”

The Financial Times on Sunday reported that British Prime Minister Theresa May had asked officials to examine the merger. Her team held talks with both companies on their plans for job growth, research and development, and operations in the UK. Unilever is co-headquartered in London and Rotterdam, while Kraft Heinz is based in Chicago.

Kraft's offer of $50 per share valued Unilever around $143 billion and represented an 18% premium on the company's value, but Unilever said the offer undervalued it. A merger between the two companies would have been one of the largest in history.

As Business Insider previously reported, Kraft Heinz produces goods including Heinz Ketchup and Philadelphia cream cheese, and is well known for its ties to investing legend Warren Buffett. According to a recent filing, Buffett's Berkshire Hathaway had a near $30 billion stake in Kraft Heinz at the end of the fourth quarter.

Brazilian billionaire Jorge Lemann is also heavily invested in Kraft Heinz through his private equity firm 3G Capital. Kraft Heinz itself was formed by the 2015 merger of Kraft and Heinz, a deal orchestrated by Buffett and Lemann. The two were also behind the 2014 merger of Burger King and Tim Hortons.

Both Kraft Heinz and Unilever are true giants of the consumer goods industry and the range of everyday brands that the two companies produce is staggering. Unilever controls 15 brands which generate annual sales of more than €1 billion ($1.07 billion), including Dove, men's grooming products made by Lynx (also known as Axe), and Lipton tea.

Will Martin contributed reporting.