President Obama on Tuesday lent his support and bully pulpit to his Treasury Department's efforts to stop companies from fleeing the country, saying that he was "very pleased" that the agency has sought to close "one of the most insidious tax loopholes," namely corporate inversions.

Obama also called on Congress to pass legislation to help prevent companies from shielding profits from taxes, to help fund domestic priorities at home.

Citing recent revelations about tax evasion by wealthy individuals included in a leak from a Panamanian law firm, the president said "tax avoidance is a big global problem."

"A lot of its legal, but that's exactly the problem," said Obama, claiming that the costs of tax avoidance fall on the middle class, who face higher taxes as a result.

An inversion is a tax maneuver in which a U.S. corporation merges with a business in a low-tax country, and then places the headquarters of the newly combined company in the low-tax jurisdiction. Such deals have become increasingly frequent in recent years, raising fears about erosion of the corporate tax base.

The forthcoming tax rules announced by the Treasury Monday, the third iteration of anti-inversions guidance, take aim at a specific technique used by some corporations to lower their U.S. tax bills known as "earnings stripping."

Earnings stripping is a way of shifting taxable income out of the U.S., which has the highest corporate tax rate among developed nations at 35 percent, into lower-tax countries. It works by having the U.S. subsidiary of the inverted company issue large amounts of debt to the foreign parent company. The payments on that debt can be deducted from income in the U.S. and counted as taxable income in the low-tax jurisdiction.

Treasury's plan is to crack down on intra-company loans that don't finance actual investment and instead are aimed at shifting income.

Also announced Monday was a provision to prevent overseas companies that are themselves the products of past inversions from being partners in future inversions.

The overnight effect of the announcement was to cast into doubt the planned merger between the U.S.-based pharmaceutical giant Pfizer and Dublin-based drugmaker Allergan. Allergan was previously a U.S. company.

Treasury Secretary Jack Lew has said that only legislation can fully stop companies from seeking to leave the country, and that the Treasury's unilateral efforts can only make it harder to complete inversions transactions and undercut the tax benefits of doing so.

Republican lawmakers, however, criticized the move, arguing that rather than punitive measures, tax reform that lowers tax rates is the solution to the pressures companies are facing to undergo inversions.