Burger King and Tim Hortons have reached an agreement to form “the world’s third largest quick service restaurant company,” the companies announced Tuesday.

The Canadian doughnut giant has agreed to be taken over by the U.S. burger chain in a deal worth $12.5 billion, the two companies confirmed in a joint press release sent out early Tuesday morning.

The confirmation comes a day after they said they were in talks to create a new company.

In a call with shareholders later Tuesday morning, executives with both companies said they expect the deal to close by the end of the year or early in 2015.

They also said they will announce the new company’s name before markets close on Tuesday.

American billionaire investor Warren Buffet’s Berkshire Hathaway put up $3 billion to help finance the deal, the statement said. Buffet’s company is “simply a financing source” and will not have any role in managing the company.

Investment firm 3G Capital, which has a 70 per cent equity stake in Burger King, will own approximately 51 per cent of the new company, the release said.

The new company will be “a global powerhouse,” but the beloved doughnut chain will not change, Tim Hortons president and CEO Marc Caira told reporters in a teleconference.

“Tim Hortons will still be Tim Hortons. We will still be the company of the Timbit and of the Double Double,” Caira said.

“We will have the ability to be bolder, and we will be in a better position to take our brand quickly and efficiently to a global customer base.”

The merger will not affect Tim Hortons’ business model, the joint statement said. The company will continue to run its charitable and community programs, including its children’s foundation and TimBits sports program. The company also promises that “there will be no changes to restaurant-level employment.”

The new company, which will be based in Canada, will comprise more than 18,000 restaurants in 100 countries, and is expected to rack up some $23 billion in system sales, the release said.

However, the two brands will be managed independently. The doughnut chain’s head office will remain in Oakville, Ont., while Burger King’s will continue to be in Miami.

Caira said it is too early to speculate where in Canada the new company’s global headquarters will be located.

Under the terms of the deal, Tim Hortons shareholders will receive C$65.50 in cash and 0.8025 common shares of the new company per Tim Hortons share. Based on Burger King’s closing stock price on Monday, that puts the total value per Tim Hortons share at C$94.05.

Shares of the new company will be listed on both the New York Stock Exchange and the Toronto Stock Exchange.

According to the joint statement:

Alex Behring, executive chairman of Burger King and managing partner at 3G capital, will serve as the new company’s executive chairman and director.

Caira will serve as vice-chairman and a director, and will focus on overall strategy and global development.

Burger King CEO Daniel Schwartz will be Group CEO of the new company, responsible for day-to-day management.

When asked by a reporter how the deal came about, Caira said Tim Hortons was not actively looking for a buy or sell opportunity. However, he added that the company’s board of directors has a responsibility to review all offers that come in. The reporter asked whether that meant Burger King approached Tim Hortons, and Caira replied: “That would be a fair conclusion.”

Burger King executives denied that the deal had anything to do with tax considerations, despite claims to the contrary. Rather, the decision to headquarter the new company in Canada is based on the fact that it will be its largest market by most key metrics: market share, revenue, assets and employees, Schwartz said.

Because Burger King’s headquarters will remain in Miami, the company will continue to pay federal, state and local taxes on its U.S. income, CEO Daniel Schwartz told reporters. Because of its overseas business operations, the company’s combined tax rate will remain in the mid-20s, which is consistent with Canada’s corporate tax rate, he noted.

Asked whether Tim Hortons will one day be doing more business internationally than in Canada, Caira said the company’s “core market has been, will be, will continue to be Canada.

“We’re totally committed to Canada,” Caira said. “We are dedicated to growing our business in Canada.”

Still have questions? Replay our liveblog of the teleconference with company executives: