President Biden wants to stop U.S. companies from hiding their profits in offshore tax havens such as the Cayman Islands and Bermuda. He’ll hardly be the first Oval Office occupant to try.

When President Barack Obama wanted to stop U.S. corporations from using a tax dodge he scorned as “unpatriotic,” the Treasury Department rewrote the rules governing cross-border deals known as inversions.

Such maneuvers allowed U.S. multinational corporations to effectively transform themselves for tax purposes into foreign companies by merging with an overseas business. American icons such as Sara Lee had used the technique in recent years and dozens of other companies were said to be readying similar moves when the Treasury Department acted in September 2014.

But even as the regulations were unveiled, the treasury secretary at the time, Jack Lew, acknowledged they were an imperfect solution to the profit-shifting problem.

“The best way to address these transactions,” he said, would have been through legislation, which a divided Congress had refused to pass. “There are limits to what we can do administratively.”

Lew’s modesty was justified. Just three weeks later, Steris, an Ohio-based maker of medical devices, announced it was acquiring Synergy Health Holdings of the United Kingdom and changing its tax residence to the U.K. Burger King, likewise, went ahead with its takeover of Toronto-based Tim Hortons, which made the American hamburger giant a Canadian taxpayer in the eyes of the Internal Revenue Service.

Over the next few years, the Obama administration tightened the regulations further and succeeded in reducing — though not eliminating — the flow of companies abandoning their American identity. But inversions were only one of the tools corporations used to escape the IRS. In 2017, when the Trump administration wrote a massive corporate tax cut, it too tried to curb global profit-shifting and again met with only partial success.

These twin episodes illustrate the intractable nature of a tax-writing challenge that long has bedeviled presidents from both parties — and now confronts Biden. Corporations have never been more agile in the face of government attempts to wring money from them. Steris, for example, cut its effective tax rate approximately in half by inverting, its securities filings show. Relative to the size of the economy, corporate tax revenue is now less than one-quarter what it was in 1967, according to the Congressional Budget Office.

As Biden proposes raising the corporate rate, profit-shifting is undermining public faith in the U.S. tax system and could be costing the federal government $100 billion annually in lost revenue. Biden’s proposal notably promises to “put in place strong guardrails against corporate inversions,” seven years after the Obama Treasury Department targeted them.

Since the corporate tax was first introduced in 1909 — at a rate of 1 percent — there have been arguments over how to determine where income is earned and how it should be taxed. The challenge has only grown as U.S. corporations globalized: Microsoft does business in 170 countries; McDonald’s is in 122; and Nike operates in 45.

The nature of economic activity also has changed over time, from bending metal in traditional factories to writing software code in Silicon Valley that produces an application sold around the world.

That evolution from tangible goods to intangible products such as intellectual property, patents, brand names, goodwill and trademarks is challenging the traditional model of corporate taxation, leading to attempts to raise revenue from companies in novel ways. European governments are pushing a new digital services tax for Internet-age leaders such as Facebook and Google, which earn enormous profits in countries where they have limited or no physical presence.

“Having a global economy that’s so dependent upon intangible assets creates more opportunity to shift activities and shift income,” said Michael Mundaca, U.S. national tax department leader for Ernst & Young. “Sixty years ago, you needed a factory or a business somewhere. Now you can realistically say the return to an asset created by smart people thinking about things can be in 50 different places.”

The complexity of U.S. tax rules leaves ample room for clever accountants and lawyers to cut corporate liabilities by assigning assets and income to low-tax jurisdictions. Among them are Ireland, which has made its 12.5 percent corporate tax rate a pillar of its development strategy for nearly a half-century; the Cayman Islands; Bermuda; and the Netherlands.

The results are evident in government statistics. In the most recent data available, U.S. multinationals reported making in 2018 almost seven times as much money in tiny Ireland as in the People’s Republic of China.

The foreign affiliates of U.S. corporations told the Commerce Department they booked $217.4 billion in profits in Ireland and just $31.2 billion in China — even though there are almost 300 Chinese people for every Irish citizen.

Over the years, agile bookkeepers employed blindingly complex strategies nicknamed the “Double Irish,” “the Dutch sandwich” and “the Single Malt” to effect the corporate profit-shifting. One common mechanism involved the pricing of intracompany sales and loans. Regulators in some cases closed loopholes that permitted such maneuvers, only to see others arise to replace them.

“Despite attempts to rein in profit-shifting, tax havens are as available today as they were prior to the 2017 tax reform,” the Treasury Department said in introducing Biden’s plan.

More than 60 percent of U.S. multinationals’ reported foreign income is booked in seven small countries that promise to only nibble at corporate profits, about twice the share as in 2000, according to Bank of America.

The tax avoidance efforts — entirely legal under U.S. law — resulted in 55 of the nation’s largest corporations paying no federal income tax last year. FedEx, for example, reported $1.2 billion of pretax income and received a federal rebate of $230 million, according to an analysis by the Institute on Taxation and Economic Policy.

Corporations’ success in minimizing their tax bills has had a corrosive effect on public opinion. Gallup polling in recent years has consistently shown about 70 percent of Americans believe corporations are paying too little in federal taxes.

The 2017 tax bill — which President Donald Trump billed as a boon for “everyday American workers” — was supposed to change that.

Three days before Christmas 2017, Trump called reporters to the Oval Office for a hastily scheduled ceremony to sign his signature $1.9 trillion tax legislation. The bill lowered the top marginal tax rate for personal income and increased the standard deduction while fulfilling the business community’s long-sought goal by slashing the corporate rate from 35 percent to 21 percent.

“Corporations are literally going wild over this,” the president enthused during the ceremony.

Dropping the U.S. rate from one of the developed world’s highest to below average for members of the Organization for Economic Cooperation and Development meant a windfall for corporate finances. Coupled with other provisions of the new law, it also appeared to reduce the incentive for creative accounting that would ship profits to low-tax foreign haunts.

Under the old system, profits earned overseas were subject to U.S. tax only when they were brought home. So U.S. corporations accumulated an estimated $2.6 trillion in their foreign bank accounts. The 2017 law encouraged companies to repatriate those funds by offering a one-time 15.5 percent rate, payable over eight years.

The legislation also created a minimum 10.5 percent tax on foreign income called the Global Intangible Low-Tax Income (GILTI) provision. In theory, the new rule should have cut U.S. multinationals’ reported profits in tax havens by 12 percent to 16 percent, according to an analysis by Kim Clausing, a tax specialist and economics professor at Reed College.

Instead, choices made in the design of the minimum tax — and other elements of the 2017 legislation that worked at cross purposes to it — resulted in “no evidence of a reduction in profit shifting,” wrote Clausing, who is now deputy assistant treasury secretary for tax analysis.

Contrary to the law’s advance billing, it actually promoted additional profit-shifting and offshoring, according to Democratic critics. The 10.5 percent global minimum was just half the U.S. rate, meaning corporations could still lower their tax bills by moving income abroad.

Plus, GILTI was assessed on a global basis, allowing companies to blend their tax payments in high-tax foreign jurisdictions with those in tax havens and thus reduce their U.S. liabilities.

The first 10 percent in foreign earnings on tangible assets also goes untouched by the IRS, effectively encouraging companies to shift factories and workers overseas, according to Treasury Secretary Janet Yellen.

“It isn’t an overstatement to say that today most firms would prefer to earn income anywhere but America,” she wrote in a Wall Street Journal op-ed.

Some tax experts said there were good reasons for the approach Republicans took in crafting the minimum tax. Calculating corporate obligations for each of a countless number of foreign countries would be an administrative nightmare for businesses and the IRS, said Rohit Kumar, co-leader of Washington national tax services for PwC.

Still, the Biden approach aims to correct what administration officials see as deficiencies in the current system by switching to a country-by-country GILTI calculation, doubling the minimum rate to 21 percent and seeking global agreement on a minimum corporate tax rate through the OECD.

That organization has been hosting talks involving 137 countries aimed at reaching a consensus on how to tax multinationals in the digital economy and the level for a global minimum levy.

“It’s a tough challenge,” said Alan Viard, a tax specialist at the American Enterprise Institute. “The prospect of getting everyone on board for a global minimum seems somewhat questionable. I don’t hold out much hope.”

That could be a problem for Biden. The administration has drafted tough new measures to discourage inversions. But without a worldwide minimum tax, the gap between the new U.S. rate and the low or zero rates available in tax havens could renew the danger of tax-allergic corporations adopting a familiar strategy, some experts said.

“Inversions haven’t been a problem for three years,” Kumar said. “But we could make them a problem again. There’s no mistake that can’t be repeated.”