IT was the legal timebomb that led to the downfall of one of Scotland's oldest and most famous football clubs.

Rangers' so-called "Big Tax Case" was seen as the catalyst for the disastrous eventual sale of the club to disgraced former owner Craig Whyte, the holding company's fall into liquidation and the team's humiliating demotion to the third division.

Yesterday upper tier tribunal judge Lord Doherty threw out an appeal by the taxman relating to the club's £50 million tax liability over the use of Employee Benefit Trusts (EBTs) to make payments to players, managers and other staff.

Her Majesty's Revenue and Customs (HRMC) contended that the EBTs were used by Rangers' former owner Sir David Murray as a way of avoiding income tax, and insisted payments made to players and other employees should be taxable.

Sir David successfully argued the payment had been loans rather than wages and therefore not subject to tax.

Many believe the prospect of the EBT tax debt was the key to Rangers' financial difficulties, with Lloyds Banking Group ­insisting club debts were cleared, sparking the calamitous sale to Mr Whyte in May 2011.

If the HMRC appeal had been successful, the debt would have been added to the millions left behind by the old club company RFC 2012 plc, with little effect on the newco company.

The ruling was seen as vindication for fans over the persistent allegation the club had effectively cheated its way to titles through the use of EBTs..

EBTs were commonly used to enable companies to minimise the income tax and National Insurance paid by high-earning employees and directors, and to allow those companies to claim corporation tax deductions on payments into the trust.

The concern over Rangers' tax liability grew when in May 2012 a BBC documentary team claimed 63 players and 24 staff members received EBT payments and 53 of them were provided with "side letters" detailing the structure of payments.

However, many of the previous tax advantages of that particular arrangement were removed as part of the 2011 Finance Act.

HMRC contends that EBTs were used by more than 5000 UK firms, including football clubs in England. The decision is seen as a blow to its bid to claw back many millions of pounds from the use of the scheme.

Football finance expert Neil Patey, a partner at Ernst and Young, said he did not believe the ruling would stop HRMC pursuing firms operating EBTs.

"Losing the appeal doesn't help them. You could say that publicly it is more an embarrassment that they pursued this so aggressively and lost it, but they will say, rightly, it is taxpayers' money at the end of the day and if they think tax is due it is right that they pursue it," he said.

"But the fact they lost this one won't necessarily put them off the other ones because every case is slightly different."

Mr Patey said the case result vindicated the oldco board, as it affirmed it was not doing anything illegal with the use of the EBT scheme.

"This was tax planning, which I think Rangers will admit themselves was at the aggressive end of the scale, but it has been found to be at the right side of legality."

In December, 2012, a panel found that the oldco, owned by Murray Group Holdings through a subsidiary at the time, was not liable to pay tax on its EBTs after it won the appeal "in principle".

Three months later HMRC launched an appeal.