The former head of Revenue and Customs (HMRC) took into account potential embarrassment to George Osborne when letting off Goldman Sachs from paying up to £20m in interest payments, a judge has concluded.
In a high court ruling, the judge found that the 2010 "sweetheart" deal brokered by the then permanent secretary for tax, Dave Hartnett, was lawful but "not a glorious episode in the history of the Revenue". He criticised the fact that it had been done behind closed doors and without proper approval or reference to lawyers.
The ruling, following a legal challenge by the pressure group UK Uncut, will come as some relief to HMRC, whose deals with large businesses have come under increasing scrutiny through the courts and before parliament.
However, the judge's criticisms will lead to further calls for closer scrutiny of deals which at present are kept hidden from all other authorities, such as select committees, because tax officials insist there must be "taxpayer confidentiality".
The judgment by Mr Justice Nicol found that Hartnett "took into account the potential embarrassment to the chancellor of the exchequer if Goldman Sachs were to withdraw from the tax code. HMRC accepts that was an irrelevant consideration and should have not featured in his decision-making process."
The court also criticised HMRC's catalogue of errors in failing to collect the tax owed. The judgment concludes: "The settlement with Goldman Sachs was not a glorious episode in the history of the Revenue. The HMRC officials who negotiated it had not been briefed by the lawyers […], they relied on their belief or recollection that there was a barrier to the recovery of interest [… and] the officials who negotiated the agreement overlooked the need for approval [of the deal]."
In declaring the deal lawful, the court found that HMRC's top officials were legally allowed to take into account the bank's threats to withdraw from the code of practice on taxation for banks in assessing whether to pursue Goldman Sachs for the tax owed.
Lawyers representing the tax authority defended the settlement, saying it was among five big business deals declared reasonable by a 2012 report of the National Audit Office.
UK Uncut said it was wrong to allow rich companies to avoid paying millions in tax while the government imposed tough austerity measures on the poor, and ordinary taxpayers were pursued for every penny.
Martin Worthy, a director of UK Uncut Legal Action, said after the hearing that he was disappointed with the ruling. "This case has shown that the government's tough talk on tax is just that – talk not substance."
Anna Walker, campaigns director of UK Uncut Legal Action, said: "Obviously, while we are deeply disappointed that this deal has not been declared unlawful, the judge's ruling that top HMRC officials played politics with major tax deals to protect Osborne's reputation is a major victory in exposing the truth behind these secret deals.
"Despite not having won the case today, we still feel that this judgment has demonstrated that the government is making a political choice to cut legal aid, public services and the welfare system, rather than take action to make corporate giants … pay their fair share of tax.
"This case has exposed the lengths the government will go to to look tough on tax avoidance and has been vital in holding the government to account for its shameful actions."
Hartnett initially shook hands on the Goldman Sachs deal on 19 November 2010 after a long-running dispute over national insurance contribution payments dating back to the 1990s.
Lawyers for UK Uncut put before the high court in London an email and a witness statement showing that Hartnett overruled legal advice, the HMRC's own guidelines and its internal review board to ensure the deal went ahead.
Just over a week after the handshake, HMRC's high-risk corporate management board attempted to block the deal, just as the chancellor announced that the top 15 banks in the country had signed up to a new code of conduct related to tax.
An email from Hartnett on 7 December 2010 described how Goldman Sachs allegedly "went off the deep end" after the board decision and threatened to withdraw from the government's code of practice, first published in December 2009.
The email warned: "The risks here are major embarrassment to the ChX [chancellor of the exchequer], HMRC, the LBS [the large business service of the HMRC], you and me, not least if GS withdraw from the code."
The witness statement from Hartnett, who retired as head of tax last summer following strong criticism of the Goldman Sachs deal by the public accounts committee, said the bank withdrawing from the code "would have embarrassed the chancellor".
Ingrid Simler QC, appearing for UK Uncut, argued that the deal breached HMRC's statutory duties, and said an aggressive bank had been rewarded for several years of failing to pay tax it owed, causing "real disquiet among the taxpaying public".
She said the exact amount lost to the Revenue was not known but was at least £5m to £10m, and the public accounts committee had received evidence that it could be up to £20m.
James Eadie QC, appearing for HMRC, accused UK Uncut of taking legal action "to pursue politics by other means".
HMRC said in a press statement: "Large business tax settlements are a vital part of how HMRC secures tax revenues for the country and without them Britain's public finances would be seriously damaged."
guardian.co.uk © Guardian News and Media Limited 2010