The government has introduced new legislation to prevent the use of two aggressive tax avoidance schemes used by Barclays.
Her Majesty's Revenue and Customs (HMRC) was informed of the two schemes by Barclays.
The bank will now have to pay £500m in tax it had tried to avoid.
One of the schemes worked by ensuring the commercial profit the bank gained through buying back its own debt was not subject to corporation tax.
The government has now introduced legislation to prevent the scheme being used in future. The legislation will also allow HMRC to recover tax on the scheme's use in the past.
The second scheme involves authorised investment funds (AIFs).
In this scheme, the perpetrator converts non-taxable income into money that carries a repayable tax credit.
This is then declared to the Exchequer and the perpetrator receives a "repayment" of tax they never actually paid to begin with.
Draft legislation is also being introduced to counter the use of this kind of scheme which, if passed, will form part of the Finance Bill 2012.
Barclays has now adopted the Banking Code of Practice on Taxation.
David Gauke, exchequer secretary to the Treasury, said: "The government wants to ensure the tax system is fair for all and we will not allow those who seek to benefit from this aggressive avoidance to get an unfair advantage.
"We do not take today's action lightly, but the potential tax loss from this scheme and the history of previous abuse in this area mean that this is a circumstance where the decision to change the law with full retrospective effect is justified."
Data quality is key
Granted leave to appeal the judgement