Elon Musk has clinched a deal to buy Twitter Inc for $44 billion following a night of negotiations with the social media company’s board members.

Under the terms of the deal, shareholders will receive $54.20 in cash for each share of Twitter stock they own.

Upon completion of the transaction, Twitter will become a privately held company.

Musk said he will make Twitter better by enhancing the product with new features, making the algorithms open source to increase trust, defeating the spam bots, and authenticating all humans.

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