TORONTO -- Shares in Burger King and Tim Hortons have jumped dramatically on news the two fast-food companies are talking about joining forces, a move that could help the iconic coffee and doughnut chain improve its chances of expanding successfully in the U.S.

It's not known what such a deal would be worth, but both stocks surged with U.S.-based Burger King (NYSE:BKW) up 16.16 per cent to US$31.40 on the New York Stock Exchange. Shares in Tim Hortons (TSX:THI) jumped 19.66 per cent to C$82.30 on the Toronto stock market, up $13.52.

Both companies have confirmed they are talking and have said Oakville, Ont.-based Tim Hortons and Miami-based Burger King would operate as stand-alone brands.

Colin Cieszynski, a market analyst at CMC Markets Canada, said the stock reaction suggests the street thinks the combination would be a good idea, noting a proposed deal "usually has to be pretty compelling for both stocks to go up."

"What people are speculating on are two things: one, how much of a premium will Burger King be willing to pay, and the second thing is, could there be other bidders out there," he said.

Despite the sense of patriotism many Canadians may feel while drinking Tim Horton's coffee, the company has been owned by a large U.S. chain before. It was only spun-off from Wendy's in 2006, and became a publicly listed company.

But while Tim Hortons dominates the Canadian coffee market, it has struggled to find success in the U.S., and has faced competition at home in recent years from Starbucks Corp. and McDonalds Corp.

When Tim Hortons chief executive Marc Caira, a former executive at the global operations of Swiss food and beverage company Nestle, took over the top job at the coffee chain last year he placed everything under review.

The company has since launched a wide ranging review of its priorities and ways that it could boost its reputation with both domestic and international coffee consumers, and added new menu items such as a crispy chicken sandwich and side dishes to boost breakfast and lunch sales.

Joining forces with a partner like Burger King is likely to create a low cost structure as it expands into the U.S., delivering a better return to franchisees and making it a more attractive option.

In a note to clients Monday, Desjardins Securities analyst Keith Howlett called the possible merger a surprise, noting that "a key driver would be to use Burger King's presence in 98 countries to accelerate Tim Hortons' expansion in international markets."

If the transaction goes ahead, the new publicly traded company would be based in Canada and would have tax advantages for the U.S.-based burger chain.

Burger King would be able to shave its American tax bill in what's called a tax inversion, something that has become increasingly popular among U.S. companies trying to cut costs.

In an inversion, a U.S. company reorganizes in a country with a lower tax rate by acquiring or merging with a company there. Inversions allow companies to transfer money earned overseas to the parent company without paying additional U.S. taxes. That money can be used to reinvest in the business or to fund dividends and buybacks, among other things.

Companies like AbbVie, a pharmaceutical with its headquarters just outside Chicago, have tied up with companies overseas to achieve that type of tax cut.

More recently, Walgreen, the huge retail chain, backed away from such a plan under intense pressure in what is becoming an increasingly hot political issue in the United States.

The possibility of a Burger King-Tim Hortons deal shows how much things have changed in Canada when it comes to taxes.

"I don't think 10 or 20 years anyone would have thought of Canada as a tax haven. It was the other way around, everybody wanted to get out," Cieszynski said.

Under the deal, 3G Capital, the majority owner of Burger King, would continue to own the majority of the shares of the new company on a pro forma basis, with the remainder held by existing shareholders of Tim Hortons and Burger King.

The companies say the new corporation would be the world's third-largest quick service restaurant company, with approximately $22 billion in system sales and over 18,000 restaurants in 100 countries worldwide.

Shares in Tim Hortons have been trading sharply higher in recent weeks after reporting better than expected financial results and raising its outlook for the year.

The companies said they will not comment further unless there is a deal.