After a liquidity crisis at the cryptocurrency group prompted intervention from regulators around the world, FTX has filed for bankruptcy in the United States, and CEO Sam Bankman-Fried has stepped down.

The distressed cryptocurrency trading platform had been struggling to raise billions of dollars to avoid collapse following a wave of withdrawals.

FTX and its affiliated crypto trading fund Alameda Research, as well as approximately 130 other companies, filed for voluntary Chapter 11 bankruptcy in Delaware on Friday, according to a statement shared via Twitter.

“I’m really sorry that we ended up here,” FTX founder Bankman-Fried said in a series of tweets following the start of the bankruptcy filing.

Bankman-Fried stated in his tweets that the bankruptcy filing “doesn’t necessarily have to mean the end for the companies” and that he was “optimistic” that the group’s new CEO would “help provide whatever is best.”

John J Ray III has been named CEO, succeeding Bankman-Fried, who will assist with the transition.

The week-long saga, which began with a run on FTX and an abandoned takeover bid by rival Binance, has taken its toll on bitcoin and other tokens, which were already in trouble.

According to Reuters, the exchange was scrambling to raise $9.4 billion from investors and rivals as it sought to save itself following customer withdrawals.

“The Chapter 11 filing is a necessary step to allow the company to assess the situation and develop plans to move forward for the benefit of stakeholders,” Ray said in a Slack memo to FTX staff seen by Reuters. “I realize that the recent news of the situation has been troubling and stressful, but I also know that the bankruptcy filing will be the beginning of a path forward.”

Some investors, including Sequoia and SoftBank, had already written off their FTX investments. SkyBridge Capital is working to repurchase its FTX stake, according to Anthony Scaramucci, founder of the alternative investment firm, in an interview with CNBC on Friday.

These developments represent a sharp reversal for Bankman-Fried, a 30-year-old crypto executive whose fortune was estimated by Forbes to be worth around $17 billion just two months ago.

Following FTX’s announcement, bitcoin fell 5.7% to $16,524. On Wednesday, the world’s largest cryptocurrency fell to a two-year low of $15,632 before regaining some ground in a cross-asset rally following U.S. inflation data.

FTT, the FTX token, fell 34% on Friday to $2.43, resulting in an 89% weekly loss.

As FTX’s troubles mounted regulators around the world stepped in.

According to a source familiar with the investigations, FTX is being investigated by the Securities and Exchange Commission, the Justice Department, and the Commodity Futures Trading Commission.

The Cyprus Securities and Exchange Commission has requested that FTX EU cease operations on November 9, the regulator announced on Friday.

“The writing was on the wall for FTX once Binance walked away from buying it after only 24 hours of due diligence,” said Antoni Trenchev, co-founder of crypto lender Nexo.

“We are now entering the second phase of the fallout, where we will see the second order effects and learn which entities were exposed to FTX and Alameda.”