Sports Direct supremo Mike Ashley has won a High Court injunction against Rangers disclosing confidential details about its merchadise and retail agreement with the club.

It is understood to prevent the precise nature of the joint venture set up between the club and Sports Direct and championed by former Rangers chief executive Charles Green.

Mr Ashley's sports firm was reportedly awarded costs of £20,000 at the Royal Courts of Justice.

The High Court move came after Mr Ashley forced an extraordinary general meeting to force Rangers to pay back a £5 million emergency loan given to the club in January. 

Rangers responded by threatening to disclose certain details of the Rangers Retail deal to Friday's Ibrox showdown meeting.

The injunction was obtained at the Chancery Division of London's High Court after Sports Direct complained that information had already been leaked to the press.

A judge ruled: "I am satisfied there is a real risk of disclosure tomorrow of confidential information".

Sports Direct owner Mike Ashley, who has shares in Rangers and also owns Newcastle United, sent his lawyers to court after a newspaper carried reports of what the judge was told was secret information relating to commercial links between Sports Direct and Rangers which, it was claimed in court, must have come from board members.

Rangers' lawyers said there was no evidence as to the actual source of the leaks.

At Friday's general meeting at Ibrox shareholders will be asked to vote on Ashley's resolution demanding repayment of the loan given to club back in January.

The Newcastle owner, who holds an 8.92 per cent stake in the club, gave the loan to the previous Rangers board to help alleviate their latest cash crisis.

But he also used the opportunity to grab security on assets such as the club's Murray Park training ground and world-famous trademarks. On top of that, he also it allowed Sports Direct to have 75% of Rangers Retail Limited and, it is believed, three-quarters of the club's profits from the sale of shirts and other merchandise.

Since the loan was agreed in January, Mr Ashley, who is Newcastle United owner has been the "ultimate controlling party" of Rangers Retail, which handles the club's merchandising and stores. Papers confirmed the switch was made from the previous controllers, Rangers International Football Club plc, the holding company.

This was one of the conditions of a £5 million emergency loan to the club by his company Sports Direct.

But the Herald revealed that Ashley and Sports Direct has had effective control of Rangers Retail for over two years before then.

At the time Rangers Football Club Ltd, the Ibrox operating company, had 51% of the joint venture and Sports Direct 49%, but Ashley and Sports Direct still had the upper hand.

That's because the company's rules were changed in November 2012, three months after the joint venture was signed off by then club supremo Charles Green. Rangers Retail's amended Articles of Association showed Sports Direct receives two votes for every share on "financial matters", ensuring Mr Ashley's company had a grip on the firm.

Accounts reveal that while Rangers Retail turnover quadrupled from £1.2 million in the year to April 2013 to £4.8m in the year to April 2014, profits only doubled from £434,312 to £877,662. That is because the costs of the sales soared by eight times that of the previous year from £546,656 to £4.2m.

It is understood most of that money has gone to Sports Direct as Rangers Retail is buying Rangers merchandise, including replica kits, gifts, polo shirts and track suits from the Ashley-controlled firm for use in club outlets.

Sports Direct confirmed that Rangers Retail has provided over £3.8m to Sports Direct in the year through such sales.

The latest half-year accounts produced by the new board of Rangers International Football Club plc further reveal that a £395,000 provision was made in Ibrox finances which in part recognised an obligation of Rangers Retail to "purchase stock at a cost higher than its resale value" for the 2013/14 season.

The new plc figures show that as working capital continues to be at issue, as of the end of December, there was £3.2m "relating to Rangers Retail" included within the £3.33m cash balances which was "not immediately available as working capital to the group".

When Rangers Retail, a joint venture with Sports Direct, was confirmed by the club under then chief executive Charles Green in August 2012, it was promoted as enabling Rangers "to once again control its retail operation and give supporters the chance to buy direct from the club and in doing so, continue to invest in its future".

Under the previous 10-year retail agreement with JJB struck by Sir David Murray in 2006, Rangers accepted an initial £18m from the sports firm, while it was also guaranteed a minimum royalty fee of £3m per year until 2016.

In the latest set of accounts, published in March, and as working capital was a major issue, £3.2 million relating to Rangers Retail was included in the £3.3 million cash balances of parent company Rangers International Football Club plc.

Rangers Retail runs the club's entire retail operation, including the Rangers Megastore, and hold the rights under licence to the club's famous crests.

Rangers Supporters Trust described the move by Mike Ashley to take the club to court over the details of the Sports Direct contracts as "absurd"  as the club already stated they would not break the confidentiality agreements.

And they called for fans to step up a boycott of official merchandise.

The said: "In his panic to stop Rangers fans from knowing definitively about his... dealings with our club, Mr Ashley has done them a valuable service. There can now be absolutely no doubt that the Sports Direct contracts with Rangers are of benefit to one party and one party only.  

"Our message is simple. Unless the current contracts with Sports Direct are negotiated to the satisfaction of the Rangers board, and that satisfaction is clearly communicated to fans, then we urge Rangers fans not to buy any official merchandise from club shops, Sports Direct or any other outlet. Purchasing from other shops does not solve the problem.

 In addition to this we will be publishing and maintaining a full list of the companies owned by Mr Ashley or in which he has an interest. We would request that fans spread the word to their friends and family and ask them to boycott these stores and brands also.

 "The only thing Mr Ashley understands is money. Take action and let's make sure that in the near future both players and fans can wear the Rangers jersey with pride again, knowing that it is a true symbol of our club and not a testament to one man's greed."