Elon Musk is buying Twitter for $61.4 billion in one of the biggest leveraged buyout deals in history. 

The billionaire entrepreneur and free speech absolutist has agreed to buy Twitter in a $US44 billion ($61.4 billion) deal. The Tesla CEO has come up with a financing plan that includes 12 banks, led by Morgan Stanley.

Reports say he wants to take the 16-year-old social networking platform private in order to promote public discourse and online free speech.

Investors will receive 38 per cent more for their shares than the stock’s close on April 1, which was the last business day before Mr Musk disclosed a significant stake in the company, sparking a share rally. 

Mr Musk has previously alleged that the company’s algorithms are biased, and it has become choked with automated junk posts and bots.

He has hinted that he will seek changes including allowing tweets to be edited after they are posted, and somewhat bizarrely, to turn the company’s San Francisco headquarters into a homeless shelter.

“Free speech is the bedrock of a functioning democracy, and Twitter is the digital town square where matters vital to the future of humanity are debated,” Mr Musk said in a statement this week. 

“Twitter has tremendous potential – I look forward to working with the company and the community of users to unlock it.”

The deal was unanimously approved by the company’s board, but still requires regulatory approval in the US. 

Mr Musk’s bid has not been seen as a money-making exercise, with Twitter described as “a case study in getting bigger and less profitable at the same time”.