HM Revenue & Customs lost only three of the tax avoidance cases which went to court during 2016/17.

During that year there were a total of 26 decisions in litigation over tax avoidance between HMRC and a company or individual.

As well as the three losses there was one mixed result, where the judge found in favour of HMRC on some points but against it on others.

One of the cases which HMRC said it won involved Ingenious Film Partners 2 LLP and Ingenious Games LLP.

Between them the LLPs were involved in the production of a large number of films and video games and they argued that, in the early years, this led to trading losses which their investors could set against their other taxable income.

HMRC argued that it was not a legitimate investment but a way of avoiding tax.

In August 2016 the Tax Tribunal ruled the Ingenious Media Film partnerships, which were designed to reduce investors’ tax liability, were in fact trading with a view to a profit.

This crucial question meant the partnerships have escaped being labelled as tax avoidance.

But the tribunal has effectively reduced the amount of money the investors can claim back through tax, a move which a tax expert has said could leave some making a loss.

The three cases HMRC lost involved Investec Asset Finance, Project Blue Limited and the children of a man who used tax planning to mitigate his inheritance tax bill.

The last of these involved the children of Donald Salinger, who had entered into an arrangement involving the transfer of a reversionary interest in an Isle of Man trust to the Donald Salinger Family Trust with two of his children as trustees.

After Mr Salinger’s death the children argued the reversionary interest was excluded property because no consideration was given for its acquisition, and that in any event there had been no transfer of value when it was transferred to the DSFT.

HMRC contended that consideration had been given, and that Mr Salinger had made a transfer of value of £820,000.

The judge found in favour of the children because while the reversionary interest is not excluded property, consideration was given for its acquisition and there was no loss to the value of Mr Salinger’s estate immediately following the transfer of that interest.

HMRC has been emboldened by successive governments in recent years to crackdown on tax avoidance, gaining extra funding and staff to clawback lost revenue.

In July HM Revenue & Customs declared it had collected more than £4bn through the ‘pay now, dispute later’ rules for people who have used a tax avoidance scheme.

More than 75,000 accelerated payment notices (APNs) have been issued to people under enquiry for tax avoidance since rules were introduced in 2014.

However the accelerated payment notice regime has been criticised for causing groups of investors in tax avoidance schemes to have to pay large amounts of tax with relatively little time to find the funds to settle these liabilities.