UK Uncut Legal Action, which campaigns against tax avoidance, had sought a High Court declaration that it was unlawful for the US-based investment bank to avoid a multimillion pound interest bill on unpaid tax on bonuses. Judge Andrew Nicol ruled that the decision was not unlawful even if it was not a "glorious episode."
The campaign group had claimed the deal cost taxpayers 20 million pounds (USD 31 million), though the potential cost is officially put at 8 million.
Although it lost in court, UK Uncut claimed it had won a "major victory" because the judge criticized many aspects of the way the case was handled by revenue officials.
"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 like Goldman Sachs, Amazon or Google pay their fair share of tax," said Anna Walker, the group's director.