It's official: Burger King is moving its headquarters out of the U.S.

The hamburger giant and the Canadian doughnut and coffee chain Tim Hortons announced Tuesday morning that the boards of directors of both companies had reached a definitive agreement to create a new company with 18,000 restaurants worldwide and $23 billion in annual sales. The new company will be headquartered in Canada.

The two companies had first announced the potential deal Sunday, drawing criticism from Democratic lawmakers who are concerned about U.S. companies using mergers with companies in lower-tax jurisdictions to reduce their U.S. tax payments.

So-called corporate inversions have grown dramatically in number over the past few years, mostly among pharmaceutical companies. Congressional Democrats have proposed legislation to tighten restrictions on companies relocating their headquarters to lower their taxes.

President Obama has called companies attempting the maneuver "corporate deserters," and his Treasury Department is arranging options to prevent inversions using tax rules.

All that remains for the Burger King-Tim Hortons transaction to go through now is approval from Tim Hortons shareholders, as well as from regulators in the U.S. and Canada.

The press release announcing the agreement between the companies did not cite taxes as a reason for the merger. Burger King executive chairman Alex Behring said that the companies' "combined size, international footprint and industry-leading growth trajectory will deliver superb value and opportunity for both Burger King and Tim Hortons shareholders, our dedicated employees, strong franchisees, and partners."

The Brazilian investment firm 3G Capital owns roughly 70 percent of Burger King, meaning it did not need approval from Burger King shareholders to make the deal. 3G Capital will own 51 percent of the parent company, which it says will be the third-largest fast food restaurant in the world.

Berkshire Hathaway, the holding company run by the legendary investor Warren Buffett, provided $3 billion in financing for the deal, according to the release. But Buffett's company will not have a further role in running the new business created by the merger.