(Bloomberg) -- FTX co-founder Sam Bankman-Fried’s bid to get documents from the cryptocurrency exchange’s former law firm to help prove his innocence was denied by the federal judge overseeing his fraud case.

The ruling comes as Bankman-Fried has been laying the groundwork for a possible defense that he relied on the advice of the firm, Fenwick & West LLP, in taking many of the actions for which he is being prosecuted, and therefore had no criminal intent.

Dealing a blow to that defense, US District Judge Lewis Kaplan on Friday denied his request for the documents, ruling that Fenwick and FTX debtors aren’t part of the prosecution team and that a subpoena would be no more than an overbroad “fishing expedition.”  

A spokesman for Bankman-Fried declined to comment on the ruling.

Read More: Bankman-Fried Points to Law Firm Advice as FTX Fraud Defense 

Bankman-Fried, 31, is accused of orchestrating and concealing a yearslong fraud in which he used billions of dollars in FTX customer funds for risky investments, personal expenses and political donations. He has pleaded not guilty to his 13-count indictment and is due to stand trial in October. 

His defense team has tried to argue that he depended on the lawyers’ advice. Criminal defendants sometimes make such an argument to counter prosecution claims that they broke the law intentionally.

Kaplan wrote in his order that Bankman-Fried’s proposed subpoena for the documents “does not meet the specificity, relevance and admissibility requirements” of the law.

Read More: Bankman-Fried Ordered to Face Two US Trials in FTX Fraud Case

The topics of Fenwick’s counsel included the use of encrypted messaging apps, the provision of multimillion-dollar loans to FTX executives and the exchange’s compliance with US banking regulations, Bankman-Fried’s lawyers said. They contend that those are all key elements of the charges against their client.

The case is US v. Bankman-Fried, 22-cr-673, US District Court, Southern District of New York (Manhattan).

--With assistance from Ava Benny-Morrison.

©2023 Bloomberg L.P.