Burger King has agreed to buy Canadian coffee and doughnut chain Tim Hortons for $11.4bn to create the third-largest quick service restaurant group.

The move will see Burger King shift its headquarters to Canada, where the merged company's largest market is located.

The deal is partly backed by Warren Buffett's Berkshire Hathaway Group which will invest a reported $3 billion.

Speaking to the Financial Times, Warren Buffet defended the tax inversion element of the deal that would see Burger King shift its tax liability to Canada.

Mr Buffett said Tim Hortons' strong roots in Canada - and limited presence in the US - was the main reason for moving the combined company's headquarters north of the border, not tax.

However, analysts said the deal appeared to be motivated by tax savings.

3G Capital Management, the Brazilian private equity firm that took Burger King private in 2010, will retain 51% of the combined group.

Berkshire Hathaway and 3G together own food group Heinz. 

Burger King said Tim Horton shareholders would receive C$65.50 in cash and 0.8025 shares in the combined business for each share they own.

The offer represents a 30% premium to Tim Hortons closing price on Friday.