Treasury Secretary Jack Lew wants to fix America’s broken corporate tax system “in the very near future,” but it’s not going to be easy.

“The Treasury Department is completing an evaluation of what we can do to make these deals less economically appealing,” he said in a Monday-morning speech at the Tax Policy Center.

American companies merging with foreign firms for tax reasons isn’t a new problem, but the trend has been catching on in recent months. A few weeks ago, Burger King Worldwide Inc. (NYSE:BKW) made headlines when it merged with Canadian coffee chain Tim Hortons Inc. (TSE:THI), a move seemingly based more on dollars than donuts. By moving its headquarters to Canada, the fast-food chain effectively lowered its corporate tax rate from 27.4 percent to 26.8 percent, a small difference that will make for meaningful savings over the years.

“There’s nothing new about U.S. companies being acquired by companies based in foreign jurisdictions,” said John Samuels, vice president and senior counsel of tax policy and planning at General Electric, who spoke after Lew.

“The whole world is now open for relocation and aggressively trying to court U.S. firms,” he said, adding that there are more countries than ever for American companies to choose from that offer stable governments, rule of law, major universities and infrastructure.

Medical-device maker Medtronic (NYSE:MDT) signed a $42.9 billion deal to buy an Irish firm, which could save them as much as $260 million, according to Fortune. Technology group Applied Materials Inc. (NASDAQ:AMAT) recently cut its tax rate from 22 percent to 17 percent in a $9.3 billion merger with Japan’s Tokyo Electron, which created a new company that will be based in the Netherlands, as the Financial Times reported.

There are currently no laws that specifically prohibit these so-called inversions, but Secretary Lew said the Treasury plans to do what it can to make it less profitable for companies to participate.

“This may be legal, but it’s wrong,” he said. “These companies are eroding America’s corporate tax base.”

And while he said the Treasury will be taking action to make it less profitable for companies to do this, lasting change can come only from legal change.

“Any action we take will have a strong legal and policy basis but will not be a substitute for meaningful legislation — it can only address part of the economics,” he said. “Only a change in the law can shut the door, and only tax reform can solve the problems in our tax code that lead to inversions.”