Image copyright SNS Group Image caption The case concerns the use of Employee Benefit Trusts

HM Revenue and Customs (HMRC) has won a judgement that Rangers' use of Employee Benefit Trusts (EBTs) broke tax rules.

Rangers used the scheme from 2001 until 2010 to give millions of pounds of tax-free loans to players and other staff.

In what became known as the "big tax case", HMRC claimed these were salary payments and subject to tax.

HMRC lost its appeals at tax tribunals in 2012 and 2014. Now three judges at the Court of Session in Edinburgh have upheld their appeal.

The appeal was heard by Lord Carloway, sitting with Lord Menzies and Lord Drummond Young.

The judges ruled that if income was derived from an employee's services, in their capacity as an employee, it was an emolument or earnings and "thus assessable to income tax".

The decision is in relation to Murray Group companies including the liquidated company RFC 2012 and does not affect the current owners at Ibrox.

Image copyright SNS Image caption Rangers began using EBTs under Sir David Murray

Analysis by Douglas Fraser, BBC Scotland business and economy editor

The tax authorities have not gone after Ibrox in its pre-collapse incarnation because Her Majesty's Revenue and Customs has much interest in Scottish football. It is because it has been told to step up its pursuit of those who avoid tax.

The Employee Benefit Trust was used by around 5000 British companies, of all sizes, mostly as a reward for top earning rare talent, such as management or sport.

The question was whether the reward was part of income for work, or - as has been argued - the trustee would allocate money from the offshore, untaxed trust as a loan, each one apparently unconnected with the performance of the recipient.

The Court of Session judges have issued a very clear ruling that it is "common sense" and "self-evident" that payments were linked to work. They were merely "redirection of income", and should have been declared by the employer, with tax paid through Pay As You Earn.

If that were not the case, Lord Drummond Young observes "an employee could readily avoid tax by re-directing income to members of his family to meet outgoings that he would normally pay: for example to a trust for his wife... or to trustees to pay for his children's education or the outgoings on the family home".

The judges observe, caustically, that the principle is so glaringly simple and straightforward that it seems to have been overlooked by the tax tribunals.

Their ruling is a powerful weapon HMRC can now wield, unless it's further appealed to the Supreme Court. The tax agency offered a sort of amnesty for those who were willing to settle their tax bills, on relatively favourable terms.

So far it says it has settled with 1500 companies with similar schemes, raising £1.3bn. The opportunity do cut a deal ran out in July this year. A lot of tax lawyers and their clients are about to get busy.

Delivering the opinion of the court, Lord Drummond Young said it was "common sense" that income from employment should be subject to tax.

He stated: "If the law were otherwise, an employee could readily avoid tax by redirecting income to members of his family to meet outgoings that he would normally pay: for example to a trust for his wife... or to trustees to pay for his children's education or the outgoings on the family home.

"The funds are ultimately derived as consideration for the employee's services, and on that basis they are properly to be considered emoluments or earnings."

Tax obligation

The judges' opinion states: "We are of opinion that the sums received by the trustee of the Principal Trust, and in due course by the trustees of the sub-trusts, amounted to a mere redirection of income and thus constituted emoluments or earnings of the employees in question."

The judgement ends: "We accordingly conclude that the primary argument presented for HMRC is correct: the payments made by the respondents to the Trustee of the Principal Trust in respect of employees were emoluments or earnings and are accordingly subject to income tax.

"Furthermore, those payments were made at the time of payment to the trustee of the Principal Trust, with the result that the obligation to deduct tax under the PAYE system fell on the employer who made such a payment."

Image copyright PA Image caption Rangers celebrate with the SPL Trophy in 2005

Analysis by Chris McLaughlin, BBC Scotland sports reporter

Today's court ruling will have no financial impact on Rangers, but questions will be asked about the possibility that the club gained an unfair sporting advantage during the years in question.

Lord Drummond Young himself said in his ruling that if the club hadn't operated the EBT scheme, some players "might well have taken their services elsewhere".

Through liquidation, the "newco" washed its hands of the debt, but it was adamant that the footballing history would remain.

Rangers won a total five league titles between 2001 and 2010. We now have the strange situation whereby some of that history may well have benefited from the sins of the "oldco".

If the Murray Group do not pursue an appeal and the ruling stands, it will be an un-easy part of Rangers' history, to say the very least.

In a statement, HMRC said it had pursued the proper course of action.

"HMRC has a responsibility to make sure people pay what they owe and will always challenge tax arrangements where we do not think they work.

"As supported by the decision in this case, HMRC's view is that Employment Benefit Trust avoidance schemes do not work."

The statement concluded: "HMRC will continue to settle appeals by agreement where appropriate but will if necessary continue to litigate cases where settlements cannot be agreed."