Less than two months ago, the finance ministers of the G20 gathered for a celebratory dinner in Peru to mark agreement on a “once-in-a-century” package of reforms to combat tax avoidance by multinational corporations that is costing governments up to $240bn a year. But last week a Scottish accountant unveiled a record-breaking $160bn transaction that laid bare quite how much work remains to be done.

Ian Read, chief executive of American drug maker Pfizer, has agreed plans for a so-called “tax inversion”: a takeover deal that involves joining forces with a smaller, foreign rival and assuming its overseas headquarters for tax purposes.

The deal is expected to create the world’s biggest pharmaceuticals company, with pills and treatments ranging from Botox and Viagra to specialist statins and generic drugs. But the agreed deal will also become largest-ever tax inversion, and as such has thrown an unflattering spotlight on the US tax code, highlighting long-standing weaknesses.

On the face of it, the US has one of the most onerous corporate tax regimes: its headline rate of 35% is among the highest in the world, and the authorities have taxing rights over profits made far beyond US borders. In practice, however, the system is riddled with loopholes that mean many American multinationals are achieving some of the lowest effective tax rates on record.

While this is attractive for corporations, there is a catch. To achieve a low tax rate they must keep much of their profits overseas, and that has led to a huge buildup of offshore cash. Many of America’s biggest businesses now think they can release these funds without triggering a US tax bill by moving their headquarters outside the US.

Read’s target is Allergan, itself the product of a rapid succession of tax-driven mergers. At first sight, it appears to be just as American a company as Pfizer: it is listed on the New York Stock Exchange, has its administrative head office in Parsippany, New Jersey – just 30 miles from Pfizer’s Manhattan HQ –and makes 84% of its sales in the US.

For tax purposes, however, Allergan has an advantage: it is able to tell the US authorities it is an Irish multinational. This is because its main executive office suite is in a building on Grand Canal Square, Dublin – an address that has been repeatedly used by US multinationals in aggressive tax planning. It is this structure that Pfizer hopes to replicate through a combination with Allergan.

Some critics of Read’s plan have been quick to point to the gap between US and Irish headline tax rates – 35% and 12.5% respectively – and suggest Pfizer is preparing to use a new Irish base to strip out earnings from its US operations, booking them in low-tax Dublin.

But Pfizer has already structured its affairs so as not to pay tax in the US: it has recorded losses in America every year since 2007. In fact, Pfizer has been one of America’s most proficient tax-planning multinationals for years, parking $74bn of untaxed profits outside the US. That sum is equivalent to more than 35% of Pfizer’s stock market value.

Under American tax rules, these overseas profits are taxable by the US – but, crucially, the liability can be deferred so long as the earnings are not brought back to the country. This deferral has been exploited on a huge scale by Pfizer and American multinationals such as Apple, Google, General Motors and Merck.

In total, US multinationals are sitting on an estimated $2.1tn in untaxed offshore profits, a third of which is accounted for by just 10 groups – among them Pfizer. The drug group’s chief financial officer, Frank D’Amelio, spelt out the real tax prize for Pfizer on a call with a Wall Street analyst last week. “This [Allergan deal] significantly increases our access to global cash,” he said.

Unlike their US counterparts, Irish tax authorities claim no taxing rights over earnings made by an Irish multinational through its overseas subsidiaries. With $26bn of Pfizer cash parked offshore, it is clear Read is determined to unlock this treasure chest while triggering as little tax liability as he can.

Read’s plans, however, have brought swift condemnation from politicians. “For too long, powerful corporations have exploited loopholes that allow them to hide earnings abroad to lower their taxes,” said Democratic presidential candidate Hillary Clinton. “Now Pfizer is trying to reduce its tax bill even further.” For Republican Donald Trump, the deal was simply “disgusting”.

Read professes to be baffled by these remarks. “I cannot comprehend why [the deal] is not being applauded by the political class, or why anyone would want to frustrate this transaction,” he told the Financial Times.

The political sniping about Pfizer provides the backdrop for another battle over tax issues on Capitol Hill next week. Many influential Republicans, already uncomfortable about the Peru reforms, are expected to use committee hearings to launch an attack on the European commission’s ongoing state aid investigations into suspected sweetheart tax deals granted by Ireland, the Netherlands and Luxembourg to, respectively, Apple, Starbucks and Amazon.

Well-resourced rightwing lobbyists are agitating in Washington for a final push against the G20 tax reforms. Led by the National Association of Manufacturers (NAM), they particularly want to block so-called country-by-country reporting (CBCR). Under CBCR, basic business data, broken down by geography, will be submitted privately to tax authorities around the world. It will provide tax offices with valuable anti-avoidance intelligence, and is heralded as the most significant single measure to come out of the reform programme.

But the NAM says CBCR will force US groups to divulge “sensitive, proprietary business information” to foreign powers, and should be stopped or watered down. Several influential Republicans, including Orrin Hatch, chair of the Senate finance committee, and Charles Boustany, chair of the ways and means committee – have rallied to their cause.

Hatch and Boustany have announced separate hearings into the G20-agreed reforms. “The recommendations contained in the [reform package] raise a number of serious concerns about taxpayer confidentiality, said Hatch. “At the same time, the EU has launched investigations into American multinationals ... I expect a robust discussion at this hearing on what the [G20] project means for US taxpayers ... as well as how the EU state aid investigations could potentially affect tax revenues paid to the US Treasury.”

Pascal Saint-Amans, head of the OECD unit that led the G20 reforms, played down suggestions that political pressure could derail them. “We could ask: is Congress preparing to stop the CBCR? Or is it just looking to make sure the Obama administration isn’t exceeding its executive powers? I think the answer is this is not a big moment. It’s largely about an internal US debate.”

Stephen Shay, a senior lecturer at Harvard law school who has held major tax roles in the Treasury, also believes Congress will not stand in the way of CBCR. “There is going to be a lot of Sturm und Drang, ‘this is terrible’, and ‘they’re targeting American multinationals’ from the committees ... But it’s too late. I think what the politicians are going to be told by the responsible businesses is that the bus has left the station.”

But amid the handshaking and back-slapping over the reform package in Peru last month, the words of German finance minister Wolfgang Schäuble still resonate. “That is not the end of the story,” he said. “If there is no implementation, it remains an impressive amount of paper.”

BIG INVERSIONS

Liberty/Virgin Media In February 2013, billionaire John Malone’s Liberty Media cable group acquired Virgin Media, which was then a Delaware-registered media company with virtually all its business in the UK, for $23bn. The deal was structured in such a way that the new enlarged group pays corporation tax in the UK rather than at the 35% level it was previously paying in the US. In addition Liberty used Virgin’s operating losses for future tax advantages.

Burger King/Tim Hortons Burger King moved its head office to Ontario earlier this year after its $11bn deal to buy Canadian coffee and doughnut chain Tim Hortons. The deal was a headline writer’s dream, with many referring to the whopping tax savings generated by the enlarged group paying corporation tax at just 26.5%. A KPMG report at the time of the merger ranked Canada as the country with the most business-friendly tax structures.

Arris/Pace British company Pace, the world’s largest maker of TV set-top boxes, agreed a $2.1bn takeover by Arris, a US network equipment maker earlier this year in a deal that changed the group’s domicile to the UK. At the time the bidder said it expected the deal to cut the effective tax rate of the new company to about 26-28% from the US rate of 35%. As part of the merger, a new group was incorporated in the UK although its operational headquarters remained in Suwanee, Georgia.