Newcastle United "systematically abused" the tax system to "secretly" make payments to agents and players during transfers, a court has heard.
The allegations emerged after the Tyneside club challenged a raid by HM Revenue and Customs in April.
United argued no reasonable grounds existed for believing it had engaged in tax fraud, but High Court judges ruled the warrants were "lawfully issued".
The club said it was "disappointed" and "considering its options".
St James' Park and West Ham's London Stadium were raided as part of a £5m fraud investigation.
Business and financial records were seized, along with computers and mobile phones, and Newcastle's managing director Lee Charnley was among several men arrested and later released without charge.
The club challenged the legality of the search-and-seize orders obtained by HMRC, and a hearing has been held at Leeds Crown Court.
HMRC argued that reasonable grounds existed for believing Newcastle United was ''knowingly involved'' in a multimillion-pound tax fraud, and the club's application for judicial view was dismissed.
The full judgement has now been published.
It reveals Operation Loom is looking into whether the club knew payments to agents were being "secretly" funnelled to other unlicensed agents and players themselves in a bid to circumvent income tax and National Insurance.
Regarding Demba Ba's transfer to Newcastle from West Ham, HMRC said: "It appears NUFC paid agent's fees for services of £1.9m in full knowledge that the majority would be passed on to other agents... and to a company associated with the player."
There were "further suspicions" arising out of his transfer to Chelsea in January 2013.
HMRC said it believed "NUFC systematically abused the tax system... and all payments to agents made were potentially the subject of criminal proceedings".
A spokesman for HMRC said: "We are very pleased with the court's decision which we are studying in detail. We do not comment on individual cases or ongoing investigations."
Newcastle United said in a statement: "We are disappointed with this decision given the court's findings.
"We are considering all of our options with our advisers, including whether to pursue an appeal."