U.S. fast-food chain Burger King Worldwide Inc. and Canadian coffee-and-doughnut chain Tim Hortons Inc. have agreed to an $11.4 billion tie-up that would send the combined company’s headquarters north in what may be the most visible corporate tax inversion yet.

Inversions have been growing in popularity as more U.S. companies seek to avoid high corporate taxes at home by acquiring companies in those foreign countries where the tax rates are lower. But the strategy has met with fierce opposition by lawmakers as well as the Obama administration.

“Burger King is a household name, and this will focus the public’s attention on this issue in a way that earlier inversions did not,” Rep. Chris Van Hollen (D-Maryland) told The Wall Street Journal.

Judging from public reaction online, some Canadians are not too keen on the merger either. One person commented on Twitter: “Timmies why let Burger King in on the only thing we have up on the USA. Should we just hand them our hockey gold medal at the next Olympics?”

The merger would create the third-largest fast-food chain in the world, with about $23 billion in sales and 18,000 restaurants in 100 countries. Each chain would continue to operate separately under its own brand and maintain separate franchisee networks, the companies said.

The corporate headquarters of the combined parent company would be in Oakville, Ontario, where Tim Hortons is based. Burger King, which is majority-owned by a Brazilian global investment group 3G Capital Management LLC, would keep its home offices in Miami and continue to pay taxes in the U.S., the companies said.

In a news conference after the deal’s announcement, Burger King executive chairman Alex Behring denied that the merger was motivated by a corporate tax strategy and instead pointed to growth and expansion as the rationale behind the deal, according to The Wall Street Journal.

Under the terms of the agreement, which has been approved by the boards of directors of both companies, shareholders of Tim Hortons would get the equivalent of $59.81 in cash and 0.8025 common shares in the combined company for each share of Tim Hortons—a 39 percent premium over Tim Hortons’ closing price on Aug. 22. Alternatively, each Tim Hortons shareholder could elect to receive either $80.81 in cash or 3.0879 common shares of the combined company for each of their shares of Tim Hortons, subject to proration.

Upon closing, Behring, who is also managing partner of 3G Capital, which owns 70 percent of Burger King, would lead the combined company as executive chairman and director. The private investment group would retain majority control of the combined company with a 51 percent share. Marc Caira, president and CEO of Tim Hortons, would be appointed vice chairman and director in charge of group strategy and business development. Daniel Schwartz, CEO of Burger King, would become group CEO of the combined company, with responsibility for day-to-day management and operations, Burger King said in a news release.

Burger King intends to finance the purchase with $9.5 billion in debt financing from Wells Fargo and J.P. Morgan. It also is getting $3 billion in preferred stock financing from Warren Buffett’s Berkshire Hathaway.

The deal is subject to Tim Hortons’ shareholder approval and antitrust and regulatory approvals in the U.S. and Canada. No shareholder vote is required of Burger King because it is majority-owned by 3G Capital.

Kirkland & Ellis and Paul, Weiss, Rifkind, Wharton & Garrison served as Burger King’s legal counsel, along with Canadian firm Davies Ward Phillips & Vineberg. Wachtell, Lipton, Rosen & Katz advised Tim Hortons with Canadian firm Osler, Hoskin & Harcourt. Munger, Tolles & Olson represented Berkshire Hathaway.

This is the second time in its history that Tim Hortons, named after the former National Hockey League player who founded the company, has teamed up with a U.S.-based restaurant chain. It originally merged with Wendy’s International in 1995 but was spun off in 2006, according to the Toronto Globe and Mail.

Burger King’s senior vice president and general counsel is Jill Granat. Tim Hortons’ executive vice president and general counsel is Jill Sutton.

The Kirkland & Ellis team for Burger King was led by corporate partners Stephen Fraidin, William Sorabella and David Feirstein, as well as tax partner Dean Shulman, debt finance partner Jay Ptashek and capital markets partners Joshua Korff and Michael Kim. Also assisting were tax partner Mike Carew and corporate associates Elizabeth Freechack, Andrew Glickman, Dylan Hanson, Jessica Subler and Laura Sullivan.

Kirkland previously represented 3G Capital in its $4 billion acquisition of Burger King Holdings, Inc. in 2010. The firm also represented the fast-food chain in its 2012 combination with Justice Holdings Limited, through which Burger King became publicly listed again.

The Paul Weiss team for Burger King includes tax partner Jeffrey Samuels, counsel Alyssa Wolpin and associate Robert Killip. The firm said this is its first deal for the client.

The Davies team advising Burger King included lead M&A partner Patricia Olasker as well as M&A partners Jay Galbraith, Steve Harris, Alex Moore and Cam Rusaw. Competition partners George Addy and Charles Tingley also worked on the deal, along with tax partners Raj Juneja, employee benefits partner Jessica Bullock and capital markets partner David Wilson.

Wachtell’s team for Tim Hortons was led by corporate partners Adam Emmerich and Gordon Moodie. Antitrust partner Nelson Fitts, restructuring partner Eric Rosof, tax partner Jodi Schwartz and executive compensation partner Michael Segal also advised, with assistance from associates Francisco Jose Morales Barron, Oliver Board, Brian Bolin, Erica Bonnett, Tijana Dvornic, Caith Kushner, Edward Lee, Sara Lewis, Katherine O’Neill, John Robinson and Michael Schobel.

Osler’s team for Tim Hortons was led by the firm’s vice chair and M&A partner Clay Horner, with M&A partner Doug Bryce, competition and antitrust partner Michelle Lally, tax partners Dov Begun and Patrick Marley, banking partner Laurie Barrett, corporate partner Don Gilchrist and pensions partner Doug Rienzo also advising.

Osler worked with Tim Hortons in 2009 when the company reincorporated from Delaware to Canada. It has continued to work with Tim Hortons ever since, the firm said.

Munger, Tolles & Olson represented Berkshire Hathaway, with a team that was led by corporate partners Robert Denham and Mary Ann Todd and also included tax partner Stephen Rose and corporate associate Kimberly Chi.

Berkshire Hathaway is a regular client of Munger Tolles, which has represented the company in several corporate transactions, including in February 2013 when it agreed to acquire the H.J. Heinz Company with 3G Capital for $28 billion, including debt. Kirkland & Ellis advised 3G Capital on that deal.