The tax authorities reached a "sweetheart deal" with Goldman Sachs to avoid "grave embarrassment" after the "aggressive" banking giant threatened to withdraw from a new code of practice aimed at reducing tax avoidance, the High Court was told.

The accusation was made by tax activists UK Uncut Legal Action, who say rich companies are wrongly being let off paying millions in tax while the Government imposes tough austerity measures on the poor.

The case concerns a 2010 settlement reached by HM Revenue and Customs (HMRC) with Goldman Sachs allowing it to avoid a multimillion-pound interest bill on unpaid tax on bonuses.

UK Uncut is seeking a High Court declaration that the agreement was unlawful and in breach of the taxman's own guidelines.

They want £20 million allegedly involved to be returned to the public purse.