Billionaire Elon Musk has struck a $44 billion deal to buy Twitter, ending a tumultuous transition period for the influential social media company.

Twitter shares are being delisted from the New York Stock Exchange, confirming that the deal is complete, according to a filing with the US Securities and Exchange Commission on Friday. Twitter will operate as a private company, not a publicly traded one.

The Washington Post, citing a person familiar with the matter, said Thursday evening that the takeover of Musk had begun. Musk fired key executives such as Twitter CEO Parag Agrawal, CFO Ned Segal and Vijaya Gade, Twitter’s head of legal policy, trust and safety, The Post reported. CNBC and Inside man also reported that Musk is now in charge of Twitter.

Twitter, Agrawal, Segal and Gadde did not respond to a request for comment. Segal confirmed on Twitter that he is no longer with the company.

Musk appeared to announce his new ownership situation late Thursday in characteristic fashion a short tweet saying, “the bird is released.” He then tweeted on Friday “let the good times roll”.

By closing the deal, Musk avoided what could have been a messy public lawsuit between him and Twitter. The social media company and Musk were originally scheduled to face each other in a five-day trial on Oct. 17. A Delaware judge delayed the process and gave Twitter and Musk until Friday to close the deal.

Twitter sued Musk in July after the Tesla and SpaceX leader said he wanted out of buying the company for $54.20 a share. Musk alleged that Twitter misrepresented the number of fake and spam accounts on its platform. Twitter, on the other hand, has accused Musk of trying to kill the deal because his personal wealth has declined and it has become more expensive to acquire.

Musk’s plan to acquire Twitter and take the publicly traded company private has been filled with many chaotic twists and turns. In an unexpected move, Musk’s lawyers said on Twitter on Oct. 3 that he intended to buy the company at the original offer price and end the legal battle.

Musk, an avid user of the service but also one of its loudest critics, decided to buy Twitter because he believes the platform “fails to adhere to the principles of free speech.” The guarantee of free speech in the US Constitution’s First Amendment applies to the government censoring speech, but not to companies like Twitter, which have their own rules about what is not allowed on their sites.

The billionaire proposed several changes to Twitter, including making the service’s algorithms open source and fighting spam and fake accounts. But he also said he plans to lift former US President Donald Trump’s permanent ban from the platform. Twitter and other platforms have kicked the politician off their services over concerns that his remarks will incite more violence following the riots on Capitol Hill on January 6. Advocacy groups and Twitter employees have also expressed concern that content moderation will be more lax under Musk, allowing hate speech and harassment to spread on the platform.

On Thursday, Musk tweeted that he believed social media was in danger of “split into far-right and far-left echo chambers” and that he didn’t want Twitter to become a “free-for-all hellscape where anything can be said without consequences.”

Musk visited Twitter’s headquarters this week and told employees he doesn’t plan to lay off 75 percent of the staff when he takes over the company. Bloomberg they reported, citing people familiar with the matter. On Wednesday, Musk shared a video of himself visiting Twitter’s headquarters.

“Going into Twitter HQ – let that sink in!” he tweeted.