Disgraced cryptocurrency exchange founder Sam Bankman-Fried said he relied on the advice of Silicon Valley law firm Fenwick & West in his defense against fraud charges.

On Tuesday, Bankman-Fried’s lawyers requested that prosecutors turn over documents that were provided to the government by the California-based firm between 2017 and 2022. The lawyers reportedly claimed the legal advice by Fenwick & West is “material to preparing a defense.”

If the government does not comply with the request, the lawyers are seeking permission to subpoena the firm.

The legal advice Fenwick & West provided is said to include the use of encrypted messaging apps, multimillion-dollar loans to FTX executives, and the exchange’s compliance with US banking regulations, all of which are key elements of the charges against Bankman-Fried.

Bankman-Fried is accused of directing a yearslong fraud in which he allegedly used billions of dollars in FTX customer funds for risky investments, personal expenses, and political donations.

However, a so-called advice-of-counsel defense could be used to rebut suggestions that Bankman-Fried intended to break the law.

“In other words, the defendant’s argument is ‘my lawyers told me it was legal, and I thought it was legal,’” New York University law Professor Stephen Gillers said.

Bankman-Fried’s request for documents has placed further scrutiny on the relationship between FTX and Fenwick & West. The firm represented Alameda Research, FTX’s hedge fund affiliate and the conduit for much of Bankman-Fried’s fraud, in 2017 and became FTX’s main outside counsel after its founding in 2019.

Fenwick & West has been sent subpoenas by law enforcement and accused by investors in a class action lawsuit of aiding Bankman-Fried’s fraud.

Some of the material requested by Bankman-Fried’s lawyers are related to alleged lies to Silvergate Bank in order to be able to open an account in 2020 and receive customer deposits for FTX’s international exchange. The bank had said he couldn’t open such an account if FTX wasn’t licensed as a money services business in the US.

While the exchange’s US platform was registered as such in 2020, the law firm reportedly advised Bankman-Fried at the time that its international division didn’t need to register in the US as it didn’t accept US customers.

Prosecutors allege that Bankman-Fried incorporated a new company, North Dimension, to get around Silvergate’s conditions and filed an application to the bank with false information.

However, Bankman-Fried has claimed that Fenwick & West provided “real-time advice” during the opening of the North Dimension account.

As reported, the disgraced crypto boss has asked a New York federal judge to dismiss most of the criminal charges brought against him by federal prosecutors.