HM Revenue and Customs brought a legal challenge against UBS and Deutsche Bank after it was previously ruled that the banks did not need to pay taxes on two £90 million ($128 million) bonus schemes run during 2003 and 2004.
Judges in the hearing called the schemes created by both banks "completely arbitrary" and said that they had "no commercial rationale beyond tax avoidance."
"It is difficult to accept that Parliament intended to encourage, by exemption from taxation, the award of shares to employees, when the award of such shares has no purpose other than the obtaining of the exemption itself," said Jonathan Mance, a judge in the case.
Both bonus schemes involved bankers receiving shares from their employers which were designated as restricted securities, and as such, not subject to income tax under
According to court papers, UBS' scheme, which involved 426 staff, allowed the bank to avoid paying around £50 million ($71.2 million) overall, split between £36.9 million ($52.5 million) in taxes, and £12.7 million ($18.1 million) of national insurance contributions.
The Financial Times reports that Deutsche Bank has already paid the owed taxes, which also amount to around £50 million.
After the ruling Deutsche Bank did not immediately comment, while UBS said in a statement that it was "disappointed" by the news.