HM Revenue and Customs has defeated a tax avoidance scheme used by the wealthy to reduce their tax bills.

The decision on the scheme, known as Clavis Liberty Fund 1 Limited Partnership, means £18m of tax money will be paid to HMRC, cash that ultimately goes to the government to be used on public services.

HMRC said the Upper Tribunal’s decision will have wider implications for hundreds of other users of Liberty schemes, predicting that it would protect £325m in unpaid tax.

Penny Ciniewicz, HMRC’s director general for customer compliance, said: “This is a brilliant victory that will bring in millions of pounds.

“We have repeatedly warned people about the financial consequences of using tax avoidance schemes.

“More and more people are coming forward and settling what they owe because they know the game is up.

“Our message is clear – steer clear of tax avoidance schemes or, like Liberty’s users, you’ll face a hefty consequence.”

The scheme was promoted to high earners by Mercury Tax Group and sought to create artificial tax losses that were later claimed against scheme users’ other income to reduce their tax bills.

It involved a limited partnership that was registered in Jersey and was claiming to carry out trade in the UK.

Each of the users of the scheme contributed a sum which was used, with a large bank loan, to acquire rights to dividends declared by a company registered in the Cayman Islands.

The partnership claimed a deduction for the cost of purchasing the dividend rights but tried to exclude the dividends received from its trading results, creating a loss which was used to reduce users’ tax bills.

The Upper Tribunal upheld a decision by the First-tier Tribunal’s that the dividend transaction was artificial and uncommercial.